From a5291b96d46fc43a3e760c53ba4b6f21b6bc36f1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 22 Jan 2022 00:50:59 +0200 Subject: [PATCH] vcvxc --- files/assets/js/userpage.js | 14 ++++++++++++-- files/templates/userpage.html | 2 +- files/templates/userpage_comments.html | 2 +- files/templates/userpage_private.html | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) 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 @@
{{u.username}}
{% endif %} - + {% endblock %} diff --git a/files/templates/userpage_comments.html b/files/templates/userpage_comments.html index aca0b0d12..b9824c883 100644 --- a/files/templates/userpage_comments.html +++ b/files/templates/userpage_comments.html @@ -114,5 +114,5 @@
{{u.username}}
{% endif %} - + {% endblock %} \ No newline at end of file diff --git a/files/templates/userpage_private.html b/files/templates/userpage_private.html index 0b64af3b0..7c83d2d4e 100644 --- a/files/templates/userpage_private.html +++ b/files/templates/userpage_private.html @@ -48,5 +48,5 @@
{{u.username}}
{% endif %} - + {% endblock %} \ No newline at end of file