MarseyWorld/files/assets/js/fart.js

10 lines
217 B
JavaScript

fart = Math.floor(Math.random() * 5) + 1
let audio = new Audio(`/i/${fart}.webp`);
audio.play();
if (audio.paused) {
document.addEventListener('click', () => {
if (audio.paused) audio.play();
}, {once : true})
}