// ======== JUSTER DATO HER ======== // Format: ÅR, MÅNED (0-11), DAG, TIMER, MINUTTER, SEKUNDER // OBS: Måneder starter på 0 (0 = januar, 3 = april) const targetDate = new Date(2026, 3, 1, 0, 0, 0); // ================================= // Lag container automatisk const container = document.createElement(«div»); container.style.display = «flex»; container.style.justifyContent = «center»; container.style.alignItems = «center»; container.style.height = «100vh»; container.style.background = «#111»; container.style.color = «#fff»; container.style.fontFamily = «Arial, sans-serif»; container.style.textAlign = «center»; document.body.appendChild(container); const timer = document.createElement(«div»); timer.style.fontSize = «80px»; timer.style.fontWeight = «bold»; timer.style.letterSpacing = «3px»; container.appendChild(timer); function updateCountdown() { const now = new Date().getTime(); const distance = targetDate.getTime() – now; if (distance <= 0) { timer.innerHTML = "🎉 Tiden er ute!"; clearInterval(interval); return; } const days = Math.floor(distance / (1000 * 60 * 60 * 24)); const hours = Math.floor((distance / (1000 * 60 * 60)) % 24); const minutes = Math.floor((distance / (1000 * 60)) % 60); const seconds = Math.floor((distance / 1000) % 60); timer.innerHTML = days + "d " + hours.toString().padStart(2, "0") + "t " + minutes.toString().padStart(2, "0") + "m " + seconds.toString().padStart(2, "0") + "s"; } updateCountdown(); const interval = setInterval(updateCountdown, 1000);