no message

This commit is contained in:
Thomas committed 2025-11-16 09:27:08 +01:00
1 parent 0156db582f
commit eb6eb665e5
2 files changed
+19 -1

No files matched your search

+17
View File
@@ -208,4 +208,21 @@ function initPopupTools() {
applyScale();
};
}
// --- Musik an/aus ---
if (btnAudio && bgmusic) {
const updateIcon = () => {
btnAudio.textContent = bgmusic.paused ? "🔈" : "🔊";
};
updateIcon();
btnAudio.onclick = () => {
if (bgmusic.paused) {
bgmusic.play().catch(() => {});
} else {
bgmusic.pause();
}
updateIcon();
};
}
}