website/_src/assets/js/bob.js

19 lines
384 B
JavaScript
Raw Normal View History

2025-10-14 19:40:29 +03:00
import { audioPath } from "./path.js";
2025-06-16 16:31:53 +03:00
let bob = document.getElementById("bob");
let help = document.createElement("audio");
2025-10-14 19:40:29 +03:00
2025-09-09 18:23:55 +03:00
help.src = `${audioPath}bob.ogg`;
2025-06-16 16:31:53 +03:00
help.loop = true;
bob.appendChild(help);
window.addEventListener("load", function () {
help.play();
help.muted = true;
});
bob.onmouseover = () => {
help.muted = false;
};
bob.onmouseout = () => {
help.muted = true;
};