paste the following code into the CSS for a page-
.firework {position: fixed;pointer-events: none;user-select: none;}
create an audio tag with the id "forksAud" right below the opening body tag
and paste this code in a script tag at the foot of the page before /body-
function firefork() { const fype = Math.random() < 0.5 ? 1 : 2; const fw = document.createElement("img"); fw.className = "firework"; fw.src = `https://mfdook.neocities.org/gifs/firework${fype}.gif`; fw.style.left = Math.random() * window.innerWidth + "px"; fw.style.top = Math.random() * window.innerHeight + "px"; if (fype === 1) { const hue = Math.floor(Math.random() * 360); fw.style.filter = `hue-rotate(${hue}deg)`; } document.body.appendChild(fw); const audio = document.getElementById("forksAud"); if (fype === 1) { const bomdex = Math.floor(Math.random() * 9) + 1; audio.src = `https://mfdook.neocities.org/crap/fw/boom${bomdex}.mp3`; } else { const glitdex = Math.floor(Math.random() * 6) + 1; audio.src = `https://mfdook.neocities.org/crap/fw/glitter${glitdex}.mp3`; } audio.play(); setTimeout(() => { fw.remove(); }, 3000); } setInterval(firefork, 5000);
audio and visuals are hosted and handled by my site