From 367da1c439cfdd0185d094b4cd848de444607b11 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Fri, 25 Jun 2021 19:45:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20[=E6=8E=92=E9=99=A4?= =?UTF-8?q?=E8=87=AA=E5=B8=A6=E6=9A=97=E9=BB=91=E6=A8=A1=E5=BC=8F=E7=9A=84?= =?UTF-8?q?=E7=BD=91=E9=A1=B5=20(beta)]=20=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index e28dc9a..bb4279e 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name 护眼模式 -// @version 1.1.1 +// @version 1.1.2 // @author X.I.U // @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式 // @match *://*/* @@ -164,7 +164,7 @@ let style_Add2 = document.createElement('style'); style_Add2.id = 'XIU2DarkMode2'; document.lastChild.appendChild(style_Add2).textContent = style_00; - } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || getColorValue(document.body) > 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989) { + } else if (window.getComputedStyle(document.body).backgroundColor === 'rgb(0, 0, 0)' || getColorValue(document.body) > 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989 || window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgb(0, 0, 0)') { // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) for (let i=0;i 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989 || window.getComputedStyle(document.body).backgroundColor === 'rgba(0, 0, 0, 0)' && window.getComputedStyle(document.lastChild).backgroundColor === 'rgb(0, 0, 0)') { + // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 + if (menu_value('menu_autoRecognition')) { // 排除自带暗黑模式的网页 (beta) + for (let i=0;i 0 && getColorValue(document.body) < 898989 || getColorValue(document.lastChild) > 0 && getColorValue(document.lastChild) < 898989) { // 如果是黑色 (等于0,0,0) 或深色 (小于 89,89,89),就停用本脚本滤镜 @@ -194,7 +211,7 @@ if (document.getElementById('XIU2DarkMode2')) document.getElementById('XIU2DarkMode2').remove(); } } - }, 3000); + }, 3000);*/ } // 获取背景颜色值