No vantablack

Replaces all black colours with a nicer gray, because black should never be used. Ever

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==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);