diff options
| -rw-r--r-- | links/index.html | 2 | ||||
| -rw-r--r-- | links/js/main.js | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/links/index.html b/links/index.html index 5f71002..48998ed 100644 --- a/links/index.html +++ b/links/index.html @@ -11,8 +11,10 @@ <link rel="stylesheet" href="/links/css/main.css"> <link rel="stylesheet" href="/css/no-text-highlighting.css"> <!-- External Libraries --> + <script src="https://code.jquery.com/jquery-3.1.1.js"></script> <!-- Invisible Script Links --> <script src="/js/hide-context-menu.js"></script> + <script src="/links/js/main.js"></script> </head> <body> diff --git a/links/js/main.js b/links/js/main.js new file mode 100644 index 0000000..c57ee6d --- /dev/null +++ b/links/js/main.js @@ -0,0 +1,26 @@ +$(window).on('keydown', function () { + if (event.keyCode == 123) + return false; + else if (event.ctrlKey && event.shiftKey && event.keyCode == 73) + return false; + else if (event.ctrlKey && event.keyCode == 73) + return false; + else if (event.ctrlKey && event.shiftKey && event.keyCode == 74) + return false; + else if (event.ctrlKey && event.keyCode == 74) + return false; +}); + +document.body.onkeyup = function (e) { + if (e.keyCode == 32 && app.skippedIntro) { + if (app.backgroundToggler) { + app.videoElement.play(); + app.audioElement.play(); + } else { + app.videoElement.pause(); + app.audioElement.pause(); + } + + return app.backgroundToggler = !app.backgroundToggler; + } +}
\ No newline at end of file |