-
Notifications
You must be signed in to change notification settings - Fork 0
/
e3-dark-theme.user.js
63 lines (54 loc) · 1.55 KB
/
e3-dark-theme.user.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
// ==UserScript==
// @name Dark Theme
// @namespace https://e3.nycu.edu.tw/
// @version 0.1
// @description dark theme!
// @author CSY54
// @include https://e3.nycu.edu.tw/*
// @exclude https://e3.nycu.edu.tw/pluginfile.php/*
// @grant GM_addStyle
// @updateURL https://github.com/CSY54/tampermonkey-userscripts/raw/master/e3-dark-theme.user.js
// @downloadURL https://github.com/CSY54/tampermonkey-userscripts/raw/master/e3-dark-theme.user.js
// ==/UserScript==
/*
* Known issue:
* - Video thumbnail got inverted
*/
(function() {
'use strict';
const styleText = `
html {
background: #000;
filter: invert(0.9) hue-rotate(180deg) !important;
}
html,
.layer2_left_caption,
.buttoncaptiona,
.btn2018_sp_caption,
.course-link:hover,
.course-link,
.cal_title .caption,
.cal_title .caption2,
.BarCard-item a,
*[class*="cal_"],
*[class*="BarCard-"] {
font-family: "Noto Sans TC", PingFangTC, "Microsoft JhengHei", "PT Sans", Arial, Helvetica, sans-serif !important;
}
img, iframe, *[style*="color:#c0c0c0"] {
filter: invert(1.1) hue-rotate(180deg) !important;
}
.btn-group.dropup {
margin-top: -20px;
}
footer {
display: none;
}
`;
// add global style
// Can't use GM_addStyle() since some font-family attributes are !important
// GM_addStyle(styleText);
// fuck those !important ==
const style = document.createElement('style');
style.textContent = styleText;
document.body.appendChild(style);
})();