This file contains 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
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
This file contains 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
// PubSub | |
(function( $ ) { | |
var o = $( {} ); | |
$.each({ | |
trigger: 'publish', | |
on: 'subscribe', | |
off: 'unsubscribe' | |
}, function( key, val ) { | |
jQuery[val] = function() { |
This file contains 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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
This file contains 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
<script> | |
(function(doc) { | |
var addEvent = 'addEventListener', | |
type = 'gesturestart', | |
qsa = 'querySelectorAll', | |
scales = [1, 1], | |
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; | |
function fix() { |
This file contains 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
<script> | |
<!-- | |
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { | |
location.replace("http://xxx"); | |
} | |
--> | |
</script> |
This file contains 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
<script type="text/javascript"> | |
/** | |
* Attach an event handler on a given Node taking care of Browsers Differences | |
* @param {Object} node | |
* @param {String} type | |
* @param {Function} fn | |
* @param {Boolean} capture | |
*/ | |
function addEventHandler(node,type,fn , capture){ | |
if(typeof window.event !== "undefined"){ |
This file contains 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
// Landscape phones and down | |
@media (max-width: 480px) { ... } | |
// Landscape phone to portrait tablet | |
@media (max-width: 767px) { ... } | |
// Portrait tablet to landscape and desktop | |
@media (min-width: 768px) and (max-width: 979px) { ... } | |
// Large desktop |
This file contains 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"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> | |
<link rel="apple-touch-startup-image" href="img/splash-screen.png" /> | |
//iPad Landscape | |
<link rel="apple-touch-startup-image" sizes="1024x748" href="img/splash-screen-1024x748.png" /> | |
//iPad Portrait | |
<link rel="apple-touch-startup-image" sizes="768x1004" href="img/splash-screen-768x1004.png" /> | |
//iPhone Portrait | |
<link rel="apple-touch-startup-image" href="img/splash-screen-320x460.png" /> |
This file contains 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
function generateNoise(opacity) { | |
if ( !!!document.createElement('canvas').getContext ) { | |
return false; | |
} | |
var canvas = document.createElement("canvas"), | |
ctx = canvas.getContext('2d'), | |
x, y, | |
number, | |
opacity = opacity || .2; |
This file contains 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
css="`cat assets/css/main.css`" && curl -sSd css="$css" http://prefixr.com/api/index.php > assets/css/main.css |
OlderNewer