diff --git a/files/assets/js/userpage.js b/files/assets/js/userpage.js index 62a897c7d..451402f2c 100644 --- a/files/assets/js/userpage.js +++ b/files/assets/js/userpage.js @@ -22,4 +22,11 @@ if (uid) document.getElementById("pause2").classList.toggle("d-none"); document.getElementById("play2").classList.toggle("d-none"); } + + window.addEventListener('load', (e) => { + audio.play(); + document.getElementById('userpage').addEventListener('click', () => { + if (audio.paused) audio.play(); + }, {once : true}); + }); } \ No newline at end of file diff --git a/files/templates/userpage.html b/files/templates/userpage.html index e5a2d69eb..644044199 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -198,17 +198,8 @@ {% endif %} {% if u.song and v and v.mute and (not u.unmutable or v.id == u.id) %} - Play anthem - Pause anthem - {% else %} - + Pause anthem + Play anthem {% endif %} {% if v and v.id != u.id and v.admin_level > 1 %} @@ -681,11 +672,11 @@ {% if v %}