From 072fe7aad5fd79d99dbfcc7080d251ebec816f2c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 30 Dec 2021 18:54:24 +0200 Subject: [PATCH] fds --- files/assets/js/userpage.js | 7 +++++++ files/templates/userpage.html | 17 ++++------------- files/templates/userpage_comments.html | 2 +- files/templates/userpage_private.html | 2 +- 4 files changed, 13 insertions(+), 15 deletions(-) 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 %}
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
- +
{{u.username}}
{% endif %} - + {% endblock %} diff --git a/files/templates/userpage_comments.html b/files/templates/userpage_comments.html index 4fe21ce5d..73ee58aa9 100644 --- a/files/templates/userpage_comments.html +++ b/files/templates/userpage_comments.html @@ -110,7 +110,7 @@ {% if v %}
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
- +
{{u.username}}
{% endif %} diff --git a/files/templates/userpage_private.html b/files/templates/userpage_private.html index 9ea5e4b60..699c011fc 100644 --- a/files/templates/userpage_private.html +++ b/files/templates/userpage_private.html @@ -44,7 +44,7 @@ {% if v %}
{% if v.patron or u.patron %}0{% else %}0.03{% endif %}
- +
{{u.username}}
{% endif %}