Greasy Fork is available in English.
1.9稳定版基础 + 排除原生黑色网站,解决黑变白问题
// ==UserScript==
// @name 智能黑暗模式 (1.97 排除版)
// @namespace http://tampermonkey.net/
// @version 1.97
// @description 1.9稳定版基础 + 排除原生黑色网站,解决黑变白问题
// @author xxb
// @license MIT
// @match *://*/*
// @exclude *://sleazyfork.org/*
// @exclude *://greasyfork.org/*
// @exclude *://github.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
// 1.95 证明最稳的 CSS 逻辑
const style = document.createElement('style');
style.id = "smart-dark-final";
style.innerHTML = `
html {
background-color: #111 !important;
filter: invert(90%) hue-rotate(180deg) !important;
min-height: 100% !important;
}
img, video, canvas, iframe, [style*="background-image"], [class*="img"], [class*="thumb"] {
filter: invert(100%) hue-rotate(180deg) !important;
}
/* 保持页头不被重复反转 */
header, nav { filter: none !important; }
`;
// 直接注入,不进行任何亮度检测(因为有 exclude 排除名单)
document.documentElement.appendChild(style);
})();