adventskalender/shared/js/door-open.js aktualisiert
This commit is contained in:
@@ -7,6 +7,12 @@ document.querySelectorAll(".door, .fluegel, .openfield").forEach(elem => {
|
||||
const day = elem.dataset.day;
|
||||
if (!day) return;
|
||||
|
||||
// 🔒 Tages-Sperre prüfen
|
||||
if (typeof isDoorUnlocked === "function" && !isDoorUnlocked(day)) {
|
||||
console.log(`Türchen ${day} ist noch gesperrt.`);
|
||||
return;
|
||||
}
|
||||
|
||||
const openfield = document.querySelector(`.openfield[data-day="${day}"]`);
|
||||
const door = document.querySelector(`.door[data-day="${day}"]`);
|
||||
const flLeft = document.querySelector(`.fluegel.left[data-day="${day}"]`);
|
||||
|
||||
Reference in New Issue
Block a user