-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
60 lines (54 loc) · 1.57 KB
/
script.js
File metadata and controls
60 lines (54 loc) · 1.57 KB
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
function goFullscreen(id) {
var element = document.getElementById(id);
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
}
function search_act() {
let input = document.getElementById('searchbar').value
input = input.toLowerCase();
let x = document.getElementsByClassName('actbox');
for (i = 0; i < x.length; i++) {
if (!x[i].innerHTML.toLowerCase().includes(input)) {
x[i].style.display = "none";
}
else {
x[i].style.display = "inline-block";
}
}
}
function descShow(elem) {
const desc = elem.querySelector("desc");
if (desc) {
desc.style.visibility = "visible";
desc.style.opacity = "1";
}
}
function descHide(elem) {
const desc = elem.querySelector("desc");
if (desc) {
desc.style.visibility = "invisible";
desc.style.opacity = "0";
}
}
function category(elem) {
let y = document.getElementsByClassName("category");
for (j = 0; j < y.length; j++) {
y[j].style.backgroundImage = "none";
}
let input = elem.textContent;
elem.style.backgroundImage = "-webkit-gradient(linear, left top, right bottom, color-stop(0.25, skyblue), color-stop(0.5, violet), color-stop(0.75, tomato))";
elem.style.padding = "3px";
input = input.toLowerCase();
let x = document.getElementsByClassName('actbox');
for (i = 0; i < x.length; i++) {
if (!x[i].innerHTML.toLowerCase().includes(input)) {
x[i].style.display = "none";
}
else {
x[i].style.display = "inline-block";
}
}
}