commit eed52e44922c9b8cc8dd04b026eb5efa6a9bf8ef
parent ccc2c9adb3dead93b109aff535b1e6762f07b9c1
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 6 Mar 2021 13:07:56 +0100
parent ccc2c9adb3dead93b109aff535b1e6762f07b9c1
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 6 Mar 2021 13:07:56 +0100
click on back element instead of window.location override
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/webmusic.js b/webmusic.js @@ -51,7 +51,7 @@ window.onkeyup = function (event) { sound.seek(sound.seek()+10); } else if (event.key === "Escape") { - window.location = '../'; + document.getElementById("back").click(); } }; @@ -83,6 +83,7 @@ function playSong(url) { src: [url], html5: true }); + setState("loading"); sound.play(); sound.loop(repeat); @@ -165,4 +166,4 @@ function formatTime(secs) { const minutes = Math.floor(secs / 60) || 0; const seconds = (secs - minutes * 60) || 0; return minutes + ':' + (seconds < 10 ? '0' : '') + seconds; -}- \ No newline at end of file +}