From 1f110e471e60ed5375a52a541fe1109ed8af1e79 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 19 Dec 2022 21:17:23 +0200 Subject: [PATCH] try to prevent the need to click "toggle anthem" twice --- files/assets/js/profile_song.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/files/assets/js/profile_song.js b/files/assets/js/profile_song.js index b88bbfa2f5..3a3e2fa2cb 100644 --- a/files/assets/js/profile_song.js +++ b/files/assets/js/profile_song.js @@ -8,8 +8,14 @@ if (u_username) audio.loop=true; function toggle() { - if (audio.paused) audio.play() - else audio.pause() + if (audio.paused) { + audio.play(); + audio.play(); + } + else { + audio.pause(); + audio.pause(); + } } audio.play();