no message

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

View File

@@ -2,12 +2,13 @@
<!-- HEADER + BUTTONS -->
<div class="popup-header">
<h2><🎁 1. Dezember Der Anfang vom Zauber</h2>
<h2>🎁 1. Dezember Der Anfang vom Zauber</h2>
<div class="popup-tools">
<button id="btn-font-toggle">Aa ↔ &#x1D49C;</button>
<button id="btn-font-up">A+</button>
<button id="btn-font-down">A</button>
<button id="btn-audio-toggle" aria-label="Musik an/aus">🔊</button>
</div>
</div>

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();
};
}
}