Fehlerkorrektur

This commit is contained in:
2025-11-10 17:25:15 +01:00
parent ca5476750b
commit 49fee638dc

View File

@@ -59,7 +59,7 @@ function openPopup(day) {
popupOverlay.classList.add("active");
// === Event für background.js (nach DOM-Initialisierung) ===
if (day === 1) {
if (day === "1") {
setTimeout(() => {
document.dispatchEvent(new CustomEvent("day01-loaded"));
console.log("[popup.js] Event 'day01-loaded' ausgelöst");
@@ -72,7 +72,7 @@ function openPopup(day) {
const videos = popupContent.querySelectorAll("video");
// Hintergrundmusik (nur Tag 1)
if (day === 1 && bg) {
if (day === "1" && bg) {
bg.volume = 0.5;
bg.currentTime = 0;
bg.play().catch(err => console.warn("Audio konnte nicht gestartet werden:", err));