From 6e60a7eb1ca97f7f5960052e076ecf6dfd70443c Mon Sep 17 00:00:00 2001 From: Naman Sood Date: Mon, 30 Dec 2019 06:30:22 -0500 Subject: [PATCH] Update easter eggs --- js/script.js | 23 +++++++++++++++++++---- randomscript.sh | 4 ++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 randomscript.sh diff --git a/js/script.js b/js/script.js index 7fa6101..840dca7 100644 --- a/js/script.js +++ b/js/script.js @@ -208,9 +208,11 @@ loop(); var sentences = [ 'Semicolons optional.', - 'Best viewed in Sublime Text 3.', - '#PCMR', + 'Best viewed in Visual Studio Code.', + 'sh -c "$(curl -sL https://nsood.in/randomscript.sh)"', 'This text is subject to change.', + 'Alliteration alert!', + 'Boolean logic jokes are funny, whether you laugh xor not.', ]; var counter = 1; @@ -324,11 +326,17 @@ for(var i = ages.length - 1; i >= 0; i--) { // easter egg -var sequence = [87, 65, 75, 65, 78, 68, 65, 70, 79, 82, 69, 86, 69, 82]; +var sequences = [ + [ 78, 79, 88 ], + [ 76, 85, 77, 79, 83 ], +]; + +var mode = 0; var eei = 0; $(window).on('keyup', function(e) { + var sequence = sequences[mode]; if(e.keyCode == sequence[eei]) { eei++; } @@ -338,7 +346,14 @@ $(window).on('keyup', function(e) { } if(eei == sequence.length) { - $('body').toggleClass('dark-mode'); + if(mode === 1) { + $('body').removeClass('dark-mode'); + mode = 0; + } + else { + $('body').addClass('dark-mode'); + mode = 1; + } eei = 0; } }) \ No newline at end of file diff --git a/randomscript.sh b/randomscript.sh new file mode 100644 index 0000000..142ce82 --- /dev/null +++ b/randomscript.sh @@ -0,0 +1,4 @@ +#!/bin/sh +echo "Dude, don't just run random scripts off the internet, that's bad form!" +echo "That said, try typing 'nox' on my website." +echo " - Naman"