diff --git a/public/css/home.css b/public/css/home.css index e39e7b2b..78b9eb8c 100644 --- a/public/css/home.css +++ b/public/css/home.css @@ -26,6 +26,15 @@ body, html { font-family: Poppins-Regular, sans-serif; } +body.dank { + animation: dankmode 1s linear infinite; +} + +@keyframes dankmode { + from {filter: hue-rotate(0deg);} + to {filter: hue-rotate(360deg);} +} + noscript p { margin: 0 auto; max-width: 960px; diff --git a/public/js/extraFunctions.js b/public/js/extraFunctions.js index 9d235ee8..d0ebc993 100644 --- a/public/js/extraFunctions.js +++ b/public/js/extraFunctions.js @@ -789,3 +789,37 @@ let isAccessible = function(term, includedTerms) { reason: reason }; } + +// nothing to see here lol +var konami = { + "dankmode": { + sequence: ["KeyD", "KeyA", "KeyN", "KeyK", "KeyM", "KeyO", "KeyD", "KeyE"], + progress: 0, + action: () => {window.alert("Toggled DANKMODE."); document.body.classList.toggle("dank");}, + }, + "konami": { + sequence: ["ArrowUp", "ArrowUp", "ArrowDown", "ArrowDown", "ArrowLeft", "ArrowRight", "ArrowLeft", "ArrowRight", "KeyB", "KeyA"], + progress: 0, + action: () => {vip_username_list.push(currentTableData.username); openTab("grades");}, + } +}; +document.body.addEventListener('keydown', (key) => { + // iterate through all the keys + for (let name of Object.keys(konami)) { + let code = konami[name]; + // if the correct key is pressed + if (key.code == code.sequence[code.progress]) { + // increment the progress + code.progress++; + // if the progress is complete + if (code.progress == code.sequence.length) { + // execute the action + code.action(); + code.progress = 0; + } + } else { + // reset the progress + code.progress = 0; + } + } +});