From 876ae0c8dde3f6c84575867ab11062ddeddd8d07 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:44:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=9C=A8=20Safari=20?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8B=E6=97=B6=E9=97=B4=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=8A=9F=E8=83=BD=E4=B8=8D=E7=94=9F=E6=95=88=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DarkMode.user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DarkMode.user.js b/DarkMode.user.js index 7cf56e6..fe4c000 100644 --- a/DarkMode.user.js +++ b/DarkMode.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 护眼模式 // @name:zh-TW 護眼模式 // @name:en Dark Mode -// @version 1.5.4 +// @version 1.5.5 // @author X.I.U // @description 简单有效的全网通用护眼模式(夜间模式、暗黑模式、深色模式) // @description:zh-CN 简单有效的全网通用护眼模式(夜间模式、暗黑模式、深色模式) @@ -498,9 +498,9 @@ // 判断当前是白天还是晚上 function isDaytime() { - let nowTime = new Date('2022-03-07 ' + new Date().getHours() + ':' + new Date().getMinutes() + ':00').getTime()/1000, time = GM_getValue('menu_customTime').split('|'); - time[0] = new Date('2022-03-07 ' + time[0] + ':00').getTime()/1000; - time[1] = new Date('2022-03-07 ' + time[1] + ':00').getTime()/1000; + let nowTime = new Date('2022/03/07 ' + new Date().getHours() + ':' + new Date().getMinutes() + ':00').getTime()/1000, time = GM_getValue('menu_customTime').split('|'); + time[0] = new Date('2022/03/07 ' + time[0] + ':00').getTime()/1000; + time[1] = new Date('2022/03/07 ' + time[1] + ':00').getTime()/1000; if (time[0] < time[1]){ if (nowTime > time[0] && nowTime < time[1]) return true return false