From 688bfb5a503b2c945f8d5f54ac032c14c7b29c0d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 10 Apr 2022 02:44:59 +0200 Subject: [PATCH] gf --- files/templates/submission.html | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/files/templates/submission.html b/files/templates/submission.html index 925435b62..b0d306e01 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -29,11 +29,6 @@ let audio = new Audio('/assets/crab.mp3'); audio.loop=true; - function toggle() { - if (audio.paused) audio.play() - else audio.pause() - } - audio.play(); window.addEventListener('click', () => { if (audio.paused) audio.play(); @@ -47,9 +42,11 @@ let audio = new Audio(`/assets/farts/${fart}.mp3`); audio.play(); - window.addEventListener('click', () => { - if (audio.paused) audio.play(); - }, {once : true}); + if (audio.paused) { + window.addEventListener('click', () => { + if (audio.paused) audio.play(); + }, {once : true}) + } {% endif %}