-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
126 lines (101 loc) · 4.12 KB
/
script.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
document.addEventListener("DOMContentLoaded", function() {
var coll = document.getElementsByClassName("collapsible");
for (var i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight) {
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});}});
const now = new Date();
const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
const tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
const hours = now.getHours();
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const year = now.getFullYear();
const month = now.getMonth()
const day = now.getDate();
const timetext = document.getElementById("time");
timetext.innerHTML =
// per line: time, clock, now, past, future, morning, day, evening, night, day, hour, minute, second, week, month, year, yesterday, today, tomorrow
`tyd = 🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧<br>
tydkrăis = 🕓⏰⏳⏱<br><br>
imå = ${hours}:${minutes}:${seconds}<br>
⬅️🕰️ dân "îne dântyd"<br>
🕰️➡️ mirăj (îne mirăjtyd)<br><br>
🌅 — môra<br>
🏞️ — dâg<br>
🌆 — gvêl<br>
🌃 — naĉt/nakt<br><br>
dâg = ${day}/${month}/${year} 12:00 -> ${tomorrow.getDate()}/${tomorrow.getMonth()}/${tomorrow.getFullYear()} 12:00<br><br>
1 dâg = 24 džikan<br>
1 džikan = 60 fûn<br>
1 fûn = 60 šoj<br><br>
7 dâg = 1 ûjk<br>
28/29/30/31 dâg = 1 mwâj<br>
12 mwâj = 1 toši<br><br>
dântâg = ${yesterday.getDate()}/${yesterday.getMonth()}/${yesterday.getFullYear()}<br>
imåtâg = ${day}/${month}/${year}<br>
mirăitâg = ${tomorrow.getDate()}/${tomorrow.getMonth()}/${tomorrow.getFullYear()}
`
setInterval(function() {
const now = new Date();
const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
const tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
const hours = now.getHours();
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
const year = now.getFullYear();
const month = now.getMonth()
const day = now.getDate();
const timetext = document.getElementById("time");
timetext.innerHTML =
// per line: time, clock, now, past, future, morning, day, evening, night, day, hour, minute, second, week, month, year, yesterday, today, tomorrow
`tyd = 🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧<br>
tydkrăis = 🕓⏰⏳⏱<br><br>
imå = ${hours}:${minutes}:${seconds}<br>
⬅️🕰️ dân "îne dântyd"<br>
🕰️➡️ mirăj (îne mirăjtyd)<br><br>
🌅 — môra<br>
🏞️ — dâg<br>
🌆 — gvêl<br>
🌃 — naĉt/nakt<br><br>
☀️ sôl<br>
🌙 lûna<br><br>
dâg = ${day}/${month}/${year} 12:00 -> ${tomorrow.getDate()}/${tomorrow.getMonth()}/${tomorrow.getFullYear()} 12:00<br><br>
1 dâg = 24 džikan<br>
1 džikan = 60 fûn<br>
1 fûn = 60 šoj<br><br>
7 dâg = 1 ûjk<br>
28/29/30/31 dâg = 1 mwâj<br>
12 mwâj = 1 toši<br><br>
dântâg = ${yesterday.getDate()}/${yesterday.getMonth()}/${yesterday.getFullYear()}<br>
imåtâg = ${day}/${month}/${year}<br>
mirăitâg = ${tomorrow.getDate()}/${tomorrow.getMonth()}/${tomorrow.getFullYear()}<br><br>
Dâgnamaj<br>
Lundâg<br>
Ajfrôjdâg<br>
Melån-ujk<br>
Airidâg<br>
Jaidâg<br>
Krendâg<br>
Soldâg
`
}, 1000);
function changeColorScheme() {
var selectedScheme = document.getElementById('color-scheme').value;
document.body.className = selectedScheme + '-scheme';
localStorage.setItem('colorScheme', selectedScheme);
}
function loadColorScheme() {
var savedScheme = localStorage.getItem('colorScheme');
if (savedScheme) {
document.body.className = savedScheme + '-scheme';
document.getElementById('color-scheme').value = savedScheme;
}
}
document.addEventListener('DOMContentLoaded', loadColorScheme);