Dark Mode

暗黑模式测试

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Dark Mode
// @name:zh-CN   Dark Mode
// @name:zh-TW   Dark Mode
// @name:en      Dark Mode
// @version      0.2
// @author       Jango
// @description  暗黑模式测试
// @description:zh-CN  暗黑模式测试
// @description:zh-TW  暗黑模式测试
// @description:en  Dark Mode Demo
// @match        *://*/*
// @namespace https://greasyfork.org/users/1255494
// ==/UserScript==


addStyle();

// 添加样式
function addStyle() {
  let remove = false;
  let style_Add = document.createElement('style')
  style_Add.id = 'DarkMode';
  style_Add.type = 'text/css';
     let style = 'html{filter: invert(90%) !important;  text - shadow: 0 0 0!important;  } img, .img, .thumb-overlay-albums canvas, video, [style*="background"][style*="url"], svg{    filter: invert(1) !important;}'
  if (document.lastElementChild) {
    document.lastElementChild.appendChild(style_Add).textContent = style;
  } else {
    let timer1 = setInterval(function () {
      if (document.lastElementChild) {
        clearInterval(timer1);
        document.lastElementChild.appendChild(style_Add).textContent = style;
      }
    });
  }
}