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 %}