Created
February 23, 2024 21:14
-
-
Save whyisthesheep/cb32e4c0ae1e0d9e4b7750e168f2d181 to your computer and use it in GitHub Desktop.
This file contains 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
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; | |
} | |
if (konamiCodeIndex == konamiCode.length) { | |
while (document.body.firstChild) { | |
document.body.removeChild(document.body.firstChild); | |
} | |
var image = document.createElement("img"); | |
image.src = "https://upload.wikimedia.org/wikipedia/commons/8/8c/Cow_%28Fleckvieh_breed%29_Oeschinensee_Slaunger_2009-07-07.jpg"; | |
image.style.width = "100%"; | |
image.style.height = "100%"; | |
document.body.appendChild(image); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment