From b9afeba4548cac2389fe50920dc28d0f184607d7 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 30 Jul 2023 04:09:24 +0300 Subject: [PATCH] fix this https://rdrama.net/post/166300/bugfixing-megathread-marseywock/4687062#context --- files/assets/js/profile_song.js | 8 ++++++-- files/templates/userpage/banner.html | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/files/assets/js/profile_song.js b/files/assets/js/profile_song.js index b2214d204..47713b969 100644 --- a/files/assets/js/profile_song.js +++ b/files/assets/js/profile_song.js @@ -36,7 +36,9 @@ if (u_username) } play_audio(audio); - document.addEventListener('click', () => { + document.addEventListener('click', (e) => { + if (e.target.id.startsWith("toggle-anthem")) + return if (audio.paused) play_audio(audio); }, {once : true}); @@ -70,7 +72,9 @@ else if (!paused) { play_audio(audio); - document.addEventListener('click', () => { + document.addEventListener('click', (e) => { + if (e.target.id.startsWith("toggle-anthem")) + return if (audio.paused) play_audio(audio); }, {once : true}); } diff --git a/files/templates/userpage/banner.html b/files/templates/userpage/banner.html index 64aa03376..d4510fb4c 100644 --- a/files/templates/userpage/banner.html +++ b/files/templates/userpage/banner.html @@ -218,7 +218,9 @@ {% endif %} {% if FEATURES['USERS_PROFILE_SONG'] and u.song and v and (v.id == u.id or v.mute and not u.unmutable) %} - + {% endif %} {% if v and v.id == u.id %} @@ -472,7 +474,9 @@ {% endif %} {% if FEATURES['USERS_PROFILE_SONG'] and u.song and v and (v.id == u.id or v.mute and not u.unmutable) %} - + {% endif %} {% if v and v.id == u.id %}