Created
March 3, 2013 22:34
-
-
Save RWJMurphy/5078636 to your computer and use it in GitHub Desktop.
The worst idea.
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
| function wat(elem){ | |
| var color = $.Color({ | |
| hue: Math.random() * 360, | |
| saturation: 1, | |
| lightness: 0.5 | |
| }); | |
| $(elem).animate( { color: color }, 500, function(){wat(elem)}); | |
| } | |
| if (window.addEventListener) { | |
| var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65"; | |
| window.addEventListener("keydown", function(e){ | |
| kkeys.push( e.keyCode ); | |
| if ( kkeys.toString().indexOf( konami ) >= 0 ) { | |
| $("body").css('background', ' url(http://omfgdogs.com/omfgdogs.gif)'); | |
| $("h1,h2,h3,h4,h5,h6,a,pre,pre span,div#slogan") | |
| .each(function(index, elem){ | |
| wat(elem); | |
| }); | |
| } | |
| while (kkeys.length >= konami.split(',').length) { | |
| kkeys.shift(); | |
| } | |
| }, true); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment