This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prints out how many watches are on a page | |
(function () { | |
var root = angular.element(document.getElementsByTagName('html')); | |
var watchers = []; | |
var f = function (element) { | |
angular.forEach(['$scope', '$isolateScope'], function (scopeProperty) { | |
if (element.data() && element.data().hasOwnProperty(scopeProperty)) { | |
angular.forEach(element.data()[scopeProperty].$$watchers, function (watcher) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(function() { Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')).forEach(function(element) { element.style.outline = '1px solid rgba(255,0,0,0.1)'; }) }, 500) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This code allows you to use console.x() functions in case they make it into production | |
* and/or into browsers that don't support them. | |
*/ | |
(function(global){ | |
var prod = global.location.href.match(/^http:\/\/(www\.)?[domainname]/i) !== null, | |
api = ["log","debug","info","warn","error","assert","dir","dirxml", "trace","group","groupCollapsed","groupEnd","time","timeEnd", "profile","profileEnd","count","exception","table"], | |
log, i, len; | |
if (typeof global.console == "undefined" || !global.console) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
white-space: pre; /* CSS 2.0 */ | |
white-space: pre-wrap; /* CSS 2.1 */ | |
white-space: pre-line; /* CSS 3.0 */ | |
white-space: -pre-wrap; /* Opera 4-6 */ | |
white-space: -o-pre-wrap; /* Opera 7 */ | |
white-space: -moz-pre-wrap; /* Mozilla */ | |
white-space: -hp-pre-wrap; /* HP Printers */ | |
word-wrap: break-word; /* IE 5+ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-webkit-hyphens: auto; | |
-moz-hyphens: auto; | |
-o-hyphens: auto; | |
-ms-hyphens: auto; | |
hyphens: auto; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prevent ios from zooming onfocus - jquery mobile version | |
( function( $ ) { | |
var meta = $( "meta[name=viewport]" ), | |
initialContent = meta.attr( "content" ), | |
disabledZoom = initialContent + ",maximum-scale=1, user-scalable=no", | |
enabledZoom = initialContent + ",maximum-scale=10, user-scalable=yes", | |
disabledInitially = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test( initialContent ), | |
preventFocusZoom = /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1; | |
$.mobileZoom = $.extend( {}, { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* prevent ios from zooming onfocus | |
http://nerd.vasilis.nl/prevent-ios-from-zooming-onfocus/ | |
*/ | |
var $viewportMeta = $('meta[name="viewport"]'); | |
$('input, select, textarea').bind('focus blur', function(event) { | |
$viewportMeta.attr('content', 'width=device-width,initial-scale=1,maximum-scale=' + (event.type == 'blur' ? 10 : 1)); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="apple-mobile-web-app-capable" content="yes"> |
NewerOlder