diff --git a/files/assets/js/userpage.js b/files/assets/js/userpage.js index 7d4b04652..0fd946d7d 100644 --- a/files/assets/js/userpage.js +++ b/files/assets/js/userpage.js @@ -12,8 +12,16 @@ if (!playing) audio.loop=true; function toggle() { - if (audio.paused) audio.play() - else audio.pause() + if (audio.paused) + { + audio.play() + localStorage.setItem("playing", "1") + } + else + { + audio.pause() + localStorage.setItem("playing", "") + } } audio.play(); @@ -43,11 +51,13 @@ if (!playing) { audio.play() localStorage.setItem("paused", "") + localStorage.setItem("playing", "1") } else { audio.pause() localStorage.setItem("paused", "1") + localStorage.setItem("playing", "") } } diff --git a/files/templates/userpage.html b/files/templates/userpage.html index 5d0ade0b0..fb069afd7 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -698,7 +698,7 @@