-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNo vantablack.js
executable file
·37 lines (35 loc) · 1.14 KB
/
No vantablack.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
// ==UserScript==
// @name No vantablack
// @namespace urn://https://www.georgegillams.co.uk/greasemonkey/no_vantablack
// @include *
// @exclude none
// @version 2.0.0
// @description:en Replaces all black colours with a nicer gray, because black should never be used. Ever
// @grant none
// ==/UserScript==
function removeVantaBlack() {
const allElements = document.getElementsByTagName('*');
for (let i = 0; i < allElements.length; i += 1) {
const element = allElements[i];
if (
element.style.backgroundColor === 'black' ||
element.style.backgroundColor === '#000' ||
element.style.backgroundColor === '#0000' ||
element.style.backgroundColor === '#00000' ||
element.style.backgroundColor === '#000000'
) {
element.style.backgroundColor = '#1e1e1e';
}
if (
element.style.color === 'black' ||
element.style.color === '#000' ||
element.style.color === '#0000' ||
element.style.color === '#00000' ||
element.style.color === '#000000'
) {
element.style.color = '#1e1e1e';
}
}
}
removeVantaBlack();
setInterval(removeVantaBlack, 5000);