Skip to content

Instantly share code, notes, and snippets.

@jamiew
Created May 18, 2009 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiew/113668 to your computer and use it in GitHub Desktop.
Save jamiew/113668 to your computer and use it in GitHub Desktop.
// instantly implement a konami code easter-egg!!!!
// from http://static.jquery.com/files/rocker/scripts/custom.js
// where it's labeled "hehe" and would open up a javascript guitar hero (!)
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 ) {
// get your konami on
// window.location = "http://ejohn.org/apps/hero/";
}
}, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment