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.4.7
3+ // @version 1.4.8
44// @author X.I.U
55// @description 宽屏显示、暗黑模式(4种)、暗黑模式跟随浏览器、屏蔽首页活动广告、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏
66// @match *://www.zhihu.com/*
@@ -383,6 +383,13 @@ html {filter: brightness(65%) sepia(30%) !important; background-image: url();}
383383
384384 // 如果开启了 [暗黑模式]
385385 if ( menu_value ( 'menu_darkMode' ) ) {
386+ // firefox 浏览器
387+ if ( navigator . userAgent . toLowerCase ( ) . indexOf ( 'firefox' ) > - 1 ) {
388+ style_darkMode_2 = style_darkMode_2_firefox
389+ style_darkMode_3 = style_darkMode_3_firefox
390+ style_darkMode_4 = style_darkMode_4_firefox
391+ }
392+
386393 // 如果开启了 [暗黑模式跟随浏览器] 且 当前浏览器是暗黑模式
387394 if ( menu_value ( 'menu_darkModeAuto' ) && ! window . matchMedia ( '(prefers-color-scheme: dark)' ) . matches ) {
388395 // 如果是暗黑模式,则需要改为白天模式
@@ -405,11 +412,6 @@ html {filter: brightness(65%) sepia(30%) !important; background-image: url();}
405412 if ( getTheme ( ) === 'dark' ) {
406413 setTheme ( 'light' ) ;
407414 }
408- if ( navigator . userAgent . toLowerCase ( ) . indexOf ( 'firefox' ) > - 1 ) {
409- style_darkMode_2 = style_darkMode_2_firefox
410- style_darkMode_3 = style_darkMode_3_firefox
411- style_darkMode_4 = style_darkMode_4_firefox
412- }
413415 }
414416 switch ( menu_value ( 'menu_darkModeType' ) ) {
415417 case 1 :
You can’t perform that action at this time.
0 commit comments