-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
time.js
109 lines (88 loc) · 2.85 KB
/
time.js
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
// auto darkmode on time
var myDate = new Date();
var time = myDate.getHours();
console.log(time);
if (time >= 18 || time <= 4) {
//dark mode - (time >= 18 || time <= 4)
//for testing - (time<18)
document.body.style.backgroundColor = "#1D1D1D";
document.getElementById("date").style.color = "#F2F2F2";
var h1 = document.getElementsByTagName("h1");
for (var i = 0; i < h1.length; i++) {
h1[i].style.color = "#fff";
}
var h2 = document.getElementsByTagName("h2");
for (var i = 0; i < h2.length; i++) {
h2[i].style.color = "#fff";
}
var h4 = document.getElementsByTagName("h4");
for (var i = 0; i < h4.length; i++) {
h4[i].style.color = "#fff";
}
var h3 = document.getElementsByClassName("liveh3");
for (var i = 0; i < h3.length; i++) {
h3[i].style.color = "#c8c8c8";
}
var h5 = document.getElementsByTagName("h5");
for (var i = 0; i < h5.length; i++) {
h5[i].style.color = "#fff";
}
var h6 = document.getElementsByTagName("h6");
for (var i = 0; i < h6.length; i++) {
h6[i].style.color = "#B5B5B5";
}
var aimg = document.getElementsByClassName("aimg");
for (var i = 0; i < aimg.length; i++) {
aimg[i].style["boxShadow"] = "0 0.5vh 2vh 0 #88888833";
}
var lw = document.getElementsByClassName("loader-wrapper");
for (var i = 0; i < lw.length; i++) {
lw[i].style.backgroundColor = "#2C2C2C";
}
document.getElementById("top").style.backgroundColor = "#1D1D1D";
var druhin = document.getElementsByClassName("druhin");
for (var i = 0; i < druhin.length; i++) {
druhin[i].style.color = "#f2f2f2";
}
} else {
//light mode
document.body.style.backgroundColor = "#fff";
document.getElementById("date").style.color = "#5D5D5D";
var h1 = document.getElementsByTagName("h1");
for (var i = 0; i < h1.length; i++) {
h1[i].style.color = "#000";
}
var h2 = document.getElementsByTagName("h2");
for (var i = 0; i < h2.length; i++) {
h2[i].style.color = "#000";
}
var h3 = document.getElementsByTagName("h3");
for (var i = 0; i < h3.length; i++) {
h3[i].style.color = "#5d5d5d";
}
var h4 = document.getElementsByTagName("h4");
for (var i = 0; i < h4.length; i++) {
h4[i].style.color = "#000";
}
var h5 = document.getElementsByTagName("h5");
for (var i = 0; i < h5.length; i++) {
h5[i].style.color = "#000";
}
var h6 = document.getElementsByTagName("h6");
for (var i = 0; i < h6.length; i++) {
h6[i].style.color = "#b7b7b7";
}
var aimg = document.getElementsByClassName("aimg");
for (var i = 0; i < aimg.length; i++) {
aimg[i].style["boxShadow"] = "0 0.5vh 2vh 0 #00000033";
}
var lw = document.getElementsByClassName("loader-wrapper");
for (var i = 0; i < lw.length; i++) {
lw[i].style.backgroundColor = "#F3F3F3";
}
document.getElementById("top").style.backgroundColor = "#fff";
var druhin = document.getElementsByClassName("druhin");
for (var i = 0; i < druhin.length; i++) {
druhin[i].style.color = "#131313";
}
}