Skip to content

Instantly share code, notes, and snippets.

@RWJMurphy
Created March 3, 2013 22:34
Show Gist options
  • Select an option

  • Save RWJMurphy/5078636 to your computer and use it in GitHub Desktop.

Select an option

Save RWJMurphy/5078636 to your computer and use it in GitHub Desktop.
The worst idea.
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