MarseyWorld/files/assets/js/fart.js

10 lines
229 B
JavaScript
Raw Normal View History

fart = Math.floor(Math.random() * 5) + 1
let audio = new Audio(`/assets/images/${fart}.webp`);
audio.play();
if (audio.paused) {
document.addEventListener('click', () => {
2023-01-01 11:36:20 +00:00
if (audio.paused) audio.play();
}, {once : true})
}