-
Notifications
You must be signed in to change notification settings - Fork 0
/
jisho-dark-mode.user.js
60 lines (57 loc) · 1.29 KB
/
jisho-dark-mode.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
// ==UserScript==
// @name Jisho Dark Mode
// @namespace http://tampermonkey.net/
// @version 0.0.6
// @description Eye friendly dark mode for Jisho.org.
// @author sheodox
// @match https://jisho.org/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
const styleTxt = `
body {
filter: invert(1);
background: #24252b !important;
}
header {
/* weird black background on header */
background: none !important;
}
/* hide okurigana */
.japanese_word__furigana-invisible {
color: transparent;
}
.concept_light-tag {
/* counteract filtering on tags, the background color is fine */
filter: invert(1);
/* better contrast text */
color: black !important;
}
/* wanikani links */
.concept_light-tag a {
color: black !important;
}
/* make search text stand out better */
#keyword {
color: black;
background-color: #cecece;
}
#search_main .inner {
background: none;
}
/* make grammar breakdowns not super dark */
.fact {
background: #cecece;
border: none;
}
/* don't invert context.reviews toasts */
#context-reviews-root {
filter: invert(1);
}
`;
const style = document.createElement('style');
style.textContent = styleTxt;
document.head.appendChild(style);
})();