ctucx.git: webmusic-nginx

nginx xslt-based index files optimized for music, inspired by https://git.ztn.sh/zotan/webmusic

commit 900a52153d88038f465c85c9b106af341a6cc096
parent 340421c3fd7b61a8dc63b1c3fd9ce178dc19df8a
Author: Leah (ctucx) <leah@ctu.cx>
Date: Fri, 5 Mar 2021 20:59:37 +0100

replace deprecated keypress event with onkeyup
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/webmusic.js b/webmusic.js
@@ -20,7 +20,7 @@ window.onload = function () {
     updateState()
 };
 
-document.addEventListener("keypress", function onEvent(event) {
+window.onkeyup = function (event) {
     if (event.key === "p") {
         togglePlayback();
     }

@@ -30,7 +30,7 @@ document.addEventListener("keypress", function onEvent(event) {
     else if (event.key === "c") {
         toggleContinue();
     }
-});
+};
 
 
 function togglePlayback() {