make an event listener be on window instead of an element

pull/2/head
Aevann1 2022-11-18 21:34:56 +02:00
parent b4448ae926
commit 78deb9d6f0
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ if (u_username)
}
audio.play();
document.getElementById('userpage').addEventListener('click', () => {
window.addEventListener('click', () => {
if (audio.paused) audio.play();
}, {once : true});