diff options
| author | s1n <[email protected]> | 2019-09-09 19:15:02 -0700 |
|---|---|---|
| committer | s1n <[email protected]> | 2019-09-09 19:15:02 -0700 |
| commit | 7b24eee043179f6c87648836ee09df1c78bdcbed (patch) | |
| tree | 78aa80815cc49fa2319d167b292ff6555e1581ad /js | |
| parent | make oops.js a visable script to fix it not workin (diff) | |
| download | s1n.pw-admin-7b24eee043179f6c87648836ee09df1c78bdcbed.tar.xz s1n.pw-admin-7b24eee043179f6c87648836ee09df1c78bdcbed.zip | |
fix konami code
Diffstat (limited to 'js')
| -rw-r--r-- | js/oops.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/js/oops.js b/js/oops.js deleted file mode 100644 index 1c5a3fc..0000000 --- a/js/oops.js +++ /dev/null @@ -1,38 +0,0 @@ -// A key map of allowed keys -var allowedKeys = { - 8: 'backspace' -}; - -// The sequence -var oopsCode = ['backspace']; - -// A variable to remember the 'position' the user has reached so far. -var oopsCodePosition = 0; - -// Add keydown event listener -document.addEventListener('keydown', function (e) { - // Get the value of the key code from the key map - var key = allowedKeys[e.keyCode]; - // Get the value of the required key from the oops Code - var requiredKey = oopsCode[oopsCodePosition]; - - // Compare the key with the required key - if (key == requiredKey) { - - // Move to the next key in the oops Code sequence - oopsCodePosition++; - - // Ff the last key is reached, activate cheats - if (oopsCodePosition == oopsCode.length) { - activateCheats(); - oopsCodePosition = 0; - } - } else { - oopsCodePosition = 0; - } -}); - -function activateCheats() { - - window.location.href = "/oops.html"; -}
\ No newline at end of file |