diff --git a/_includes/head.html b/_includes/head.html index b3a0d5ee..480dc056 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -38,7 +38,6 @@ - + + + diff --git a/assets/js/trivia.js b/assets/js/trivia.js new file mode 100644 index 00000000..ca6041f1 --- /dev/null +++ b/assets/js/trivia.js @@ -0,0 +1,32 @@ +var a = { + 37: 'left', + 38: 'up', + 39: 'right', + 40: 'down', + 65: 'a', + 66: 'b' + }; + var b = [a[38], a[38], a[40], a[40], a[37], a[39], a[37], a[39], a[66],a[65]]; + + var c = 0; + + document.addEventListener('keydown', function(e) { + var d = a[e.keyCode]; + var E = b[c]; + + if (d == E) { + + c++; + + if (c == b.length) { + H(); + c = 0; + } + } else { + c = 0; + } + }); + + function H(){ + window.location.href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" + } \ No newline at end of file