-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforcedark.js
41 lines (41 loc) · 1.29 KB
/
forcedark.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
var body = document.getElementsByTagName("BODY")[0];
var html = document.getElementsByTagName("HTML")[0];
html.style.backgroundColor = "#202020";
body.style.backgroundColor = "#202020";
html.style.color = "white";
body.style.color = "white";
var tags = ["FOOTER", "HEADER", "MAIN", "SECTION",
"NAV", "FORM",
"FONT", "EM", "B", "I", "U",
"INPUT", "P", "BUTTON", "OL", "UL", "A", "DIV",
"TD", "TH", "SPAN", "LI",
"H1", "H2", "H3", "H4", "H5", "H6",
"DD", "DT",
"INCLUDE-FRAGMENT", "ARTICLE",
"CAPTION"
];
for (let tag of tags) {
for (let item of document.getElementsByTagName(tag)) {
item.style.backgroundColor = "#202020";
item.style.color = "white";
}
}
for (let tag of ["CODE", "PRE"]) {
for (let item of document.getElementsByTagName(tag)) {
item.style.backgroundColor = "#202020";
item.style.color = "green";
}
}
for (let tag of document.getElementsByTagName("INPUT")) {
tag.style.border = "solid 1px #bbb";
}
var videos = document.getElementsByTagName("VIDEO");
for (let video of videos) {
video.style.backgroundColor = "#202020";
}
for (let tag of document.getElementsByTagName("TH")) {
tag.style.borderBottom = "solid 1px #505050";
}
for (let tag of document.getElementsByTagName("A")) {
tag.style.color = "cyan";
}