-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (47 loc) · 1.59 KB
/
index.html
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
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Gta 6 Countdown</title>
<meta name="description" content="Countdown to GTA 6 Trailer" />
<meta name="keywords" content="GTA 6, GTA VI, GTA 6 Trailer, GTA 6 Countdown" />
<meta name="author" content="Cooper" />
<script>
const countDownDate = new Date("Dec 5, 2023 09:00:00 EST").getTime();
function updateCountdown() {
const now = new Date().getTime();
const distance = countDownDate - now;
const hours = Math.floor(
(distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)
);
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);
const text = `${hours}h ${minutes}m ${seconds}s`;
document.getElementById("countdown").innerText = text
document.title = `${text} - Gta 6 Countdown`
if (distance < 0) {
clearInterval(x);
document.getElementById("countdown").innerText = "GO CHECK IT OUT!";
}
}
const x = setInterval(updateCountdown, 1000);
setTimeout(updateCountdown, 10);
</script>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
background-color: #f3f3f3;
}
#countdown {
font-size: 2em;
margin-top: 20px;
}
</style>
</head>
<body>
<h1>Countdown to GTA 6 Trailer</h1>
<div id="countdown">Loading...</div>
</body>
</html>