Created
August 30, 2010 03:28
-
-
Save jsjohnst/556979 to your computer and use it in GitHub Desktop.
View a sample here: http://jsjohnst.github.com/konami.html
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
window.addEventListener && window.addEventListener('keydown', function(e) { | |
this.keys ? this.keys.push(e.keyCode) : this.keys = [e.keyCode]; | |
if(this.keys.toString().indexOf("38,38,40,40,37,39,37,39,66,65") >= 0) { | |
var audio = document.createElement("audio"); | |
audio.src = "http://geek.thinkunique.org/wp-content/vid/tmnt.mp3"; | |
audio.play(); | |
} | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment