File size: 1,260 Bytes
9a5345d
008b1a9
91a5803
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53bc059
84bbe4b
 
 
 
 
53bc059
84bbe4b
 
53bc059
 
60176ca
 
 
84bbe4b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Target date here (Year, Month (0-11), Day, Hour, Minute)
const targetDate = new Date("2025-06-14T07:00:00Z"); // UTC time

function updateCountdown() {
  const now = new Date();
  const diff = targetDate - now;

  if (diff <= 0) {
    document.getElementById("countdown").innerHTML = "<h2>πŸš€ Launched!</h2>";
    return;
  }

  const days = Math.floor(diff / (1000 * 60 * 60 * 24));
  const hours = Math.floor((diff / (1000 * 60 * 60)) % 24);
  const minutes = Math.floor((diff / (1000 * 60)) % 60);
  const seconds = Math.floor((diff / 1000) % 60);

  document.getElementById("days").textContent = String(days).padStart(2, '0');
  document.getElementById("hours").textContent = String(hours).padStart(2, '0');
  document.getElementById("minutes").textContent = String(minutes).padStart(2, '0');
  document.getElementById("seconds").textContent = String(seconds).padStart(2, '0');
}

setInterval(updateCountdown, 1000);
updateCountdown();

const audio = document.getElementById("backgroundSound");
if (audio) {
  audio.volume = 0.05; // Set volume immediately when script loads
}

window.addEventListener('click', () => {
  if (audio && audio.paused) {
    audio.play().catch((e) => console.log("Audio autoplay blocked:", e));
  }
}, { once: true });