File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// ==UserScript==
22// @name 护眼模式
3- // @version 1.2.0
3+ // @version 1.2.1
44// @author X.I.U
55// @description 简单有效的全网通用护眼模式、夜间模式、暗黑模式
66// @match *://*/*
254254 GM_setValue ( `${ Name } ` , true ) ;
255255 GM_notification ( { text : `已开启 [${ Tips } ] 功能\n(刷新网页后生效)` , timeout : 3500 } ) ;
256256 }
257+ if ( Name === 'menu_autoRecognition' ) {
258+ location . reload ( ) ; // 刷新网页
259+ }
257260 registerMenuCommand ( ) ; // 重新注册脚本菜单
258261 } ;
259262
332335 } , 5 ) ;
333336 }
334337
335- let websiteList = menu_value ( 'menu_forcedToEnable' ) ; // 强制当前网站启用护眼模式
338+ let websiteList = [ ] ;
339+ if ( menu_value ( 'menu_autoRecognition' ) ) { // 智能排除自带暗黑模式的网页 (beta)
340+ websiteList = menu_value ( 'menu_forcedToEnable' ) ; // 强制当前网站启用护眼模式
341+ }
336342
337343 // 为了避免 body 还没加载导致无法检查是否设置背景颜色
338344 let timer = setInterval ( function ( ) { // 每 10 毫秒检查一下 body 是否已存在
You can’t perform that action at this time.
0 commit comments