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 getFileExtension(string) { | |
"use strict"; | |
return string.split(".").pop(); | |
} |
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
// requestAnimationFrame polyfill by Erik Möller | |
// Fixes from Paul Irish and Tino Zijdel | |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
(function (w) { | |
"use strict"; | |
var lastTime = 0, | |
vendors = ["ms", "moz", "webkit", "o"], | |
len = vendors.length, |
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
/** | |
* Property + initial value | |
*/ | |
-webkit-animation: name:none duration:0s timing-function:ease delay:0s iteration-count:1 direction:normal fill-mode:none; |
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 ucfirst (string) { | |
return string[0].toUpperCase() + string.substr(1); | |
} |
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
#em { | |
width: 1em; | |
visibility: hidden; | |
pointer-events: none; | |
position: absolute; | |
} |
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
html { | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
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
a { | |
/* iOS: Actions without the gray overlay */ | |
-webkit-tap-highlight-color: rgba(0,0,0,0); | |
/* iOS: Remove the actions panel */ | |
-webkit-touch-callout: none; | |
} |
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
// Create the "script" element | |
var script = document.createElement('script'); | |
// Append | |
document.getElementsByTagName('head')[0].appendChild(script); | |
// Delete | |
script.parentNode.removeChild(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
/** | |
* Konami Code | |
* @example | |
* konami(function () { | |
* alert("easter egg!"); | |
* }); | |
*/ | |
function konami(success) { | |
var keys = '', |
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
/* Hexagon kitty - By @LeaVerou | |
Disappointingly inflexible, but still interesting methinks. | |
*/ | |
.hexagon { | |
display: inline-block; | |
position: relative; | |
width: 200px; | |
height: 200px; | |
transform: scale(1.25,.707) rotate(-45deg); |