Skip to content

Instantly share code, notes, and snippets.

View whyisthesheep's full-sized avatar

whyisthesheep

View GitHub Profile
var konamiCode = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13];
var konamiCodeIndex = 0;
document.onkeydown = function (e) {
if (e.keyCode == konamiCode[konamiCodeIndex]) {
konamiCodeIndex++;
} else {
konamiCodeIndex = 0;
}