您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replaces all black colours with a nicer gray, because black should never be used. Ever
- // ==UserScript==
- // @name No vantablack
- // @namespace urn://https://www.georgegillams.co.uk/greasemonkey/no_vantablack
- // @include *
- // @exclude none
- // @version 2
- // @description:en Replaces all black colours with a nicer gray, because black should never be used. Ever
- // @grant none
- // @description Replaces all black colours with a nicer gray, because black should never be used. Ever
- // ==/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);