-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
111 lines (106 loc) · 4.44 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<html>
<head>
<title>#GCCDKOL</title>
<style>
@font-face {
font-family: "Google Sans Serif";
src: url("./GoogleSans-Regular_0.ttf");
}
body {
font-family: "Google Sans Serif";
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
#div {
position: absolute;
top: 50%;
left: 50%;
font-size: 100px;
scale: 500%;
display: none;
}
</style>
</head>
<body>
<div id="div"></div>
<script>
const params = new URLSearchParams(window.location.search);
const number = params.get("c");
const str = "#GCCDKOL";
const showStr = str[number - 1];
document.getElementById("div").innerText = showStr;
// get system time
setInterval(() => {
const actualtime = new Date()
.toLocaleTimeString("en-US", { hour12: false })
.split(":")[2];
let time = 0;
if (actualtime < 8) time = actualtime;
else if (actualtime < 17) time = 17 - actualtime;
else if (actualtime < 37) time = 37 - actualtime;
else if (actualtime < 60) time = 57 - actualtime;
// console.log(actualtime, time);
if (time < 8 || time < 17 || time < 37)
document.getElementById("div").style.display = "none";
else document.getElementById("div").style.display = "block";
if (number == 1 && (time > 0 || time > 18 || time > 38)) {
document.getElementById("div").style.display = "block";
} else if (number == 2 && (time > 1 || time > 19 || time > 39)) {
document.getElementById("div").style.display = "block";
} else if (number == 3 && (time > 2 || time > 20 || time > 40)) {
document.getElementById("div").style.display = "block";
} else if (number == 4 && (time > 3 || time > 21 || time > 41)) {
document.getElementById("div").style.display = "block";
} else if (number == 5 && (time > 4 || time > 22 || time > 42)) {
document.getElementById("div").style.display = "block";
} else if (number == 6 && (time > 5 || time > 23 || time > 43)) {
document.getElementById("div").style.display = "block";
} else if (number == 7 && (time > 6 || time > 24 || time > 44)) {
document.getElementById("div").style.display = "block";
} else if (number == 8 && (time > 7 || time > 25 || time > 45)) {
document.getElementById("div").style.display = "block";
}
// hiding starts here
if (number == 8 && (time > 8 || time > 28 || time > 48)) {
document.getElementById("div").style.display = "none";
} else if (number == 7 && (time > 9 || time > 29 || time > 49)) {
document.getElementById("div").style.display = "none";
} else if (number == 6 && (time > 10 || time > 30 || time > 50)) {
document.getElementById("div").style.display = "none";
} else if (number == 5 && (time > 11 || time > 31 || time > 51)) {
document.getElementById("div").style.display = "none";
} else if (number == 4 && (time > 12 || time > 32 || time > 52)) {
document.getElementById("div").style.display = "none";
} else if (number == 3 && (time > 13 || time > 33 || time > 53)) {
document.getElementById("div").style.display = "none";
} else if (number == 2 && (time > 14 || time > 34 || time > 54)) {
document.getElementById("div").style.display = "none";
} else if (number == 1 && (time > 15 || time > 35 || time > 55)) {
document.getElementById("div").style.display = "none";
}
// colouring starts here
if (time > 16 || time > 36 || time > 57) {
document.getElementById("div").style.display = "block";
if (number == 1 || number == 8) {
document.getElementById("div").style.color = "#e84435";
}
if (number == 2 || number == 7) {
document.getElementById("div").style.color = "#0f9d58";
}
if (number == 3 || number == 6) {
document.getElementById("div").style.color = "#fbbc04";
}
if (number == 4 || number == 5) {
document.getElementById("div").style.color = "#4285f4";
}
} else {
document.getElementById("div").style.color = "black";
}
}, 400);
</script>
</body>
</html>