use document instead of window event listener

pull/104/head
Aevann 2023-01-28 11:40:35 +02:00
parent cd573133a9
commit e58b716dde
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ const audio = new Audio(song);
audio.loop=true;
audio.play();
window.addEventListener('click', () => {
document.addEventListener('click', () => {
if (audio.paused) audio.play();
}, {once : true});
prepare_to_pause(audio)