16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
import { audioPath } from './path.js'
|
|
let bob = document.getElementById("bob");
|
|
let help = document.createElement("audio");
|
|
help.src = `${audioPath}bob.ogg`;
|
|
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;
|
|
};
|