-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathscript.js
70 lines (63 loc) · 2.06 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
function hideNotifications() {
var x = document.getElementById("notifications");
if (x.style.display === "none") {
x.style.display = "block";
x.classList.add("fade-in-bottom");
} else {
x.classList.remove("fade-in-bottom");
x.classList.add("fade-out-bottom");
setTimeout(() => { x.style.display = "none"; x.classList.remove("fade-out-bottom"); }, 300);
}
}
function hideNotify() {
var x = document.getElementById("notify");
x.classList.add("fade-out-bottom");
setTimeout(() => { x.style.display = "none"; }, 300);
}
function hideSearchBox() {
var x = document.getElementById("searchBox");
var y = document.getElementById("startMenu");
if (x.style.display === "none" && y.style.display != "none") {
y.style.display = "none";
x.style.display = "block";
x.classList.add("fade-in-bottom");
} else if (x.style.display === "none") {
x.style.display = "block";
x.classList.add("fade-in-bottom");
} else {
x.classList.remove("fade-in-bottom");
x.classList.add("fade-out-bottom");
setTimeout(() => { x.style.display = "none"; x.classList.remove("fade-out-bottom"); }, 300);
}
}
function hide() {
var x = document.getElementById("startMenu");
var y = document.getElementById("searchBox");
if (x.style.display === "none" && y.style.display != "none" ) {
y.style.display = "none";
x.style.display = "block";
x.classList.add("fade-in-bl");
} else if (x.style.display === "none") {
x.style.display = "block";
x.classList.add("fade-in-bl");
} else {
x.classList.remove("fade-in-bl");
x.classList.add("fade-out-bl");
setTimeout(() => { x.style.display = "none"; x.classList.remove("fade-out-bl"); }, 300);
}
}
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('clock').innerHTML =
h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}