Skip to content

Commit e6938f0

Browse files
committed
新增 [模式 3] 时网页滚动条也改为暗黑样式
1 parent e6f4fc4 commit e6938f0

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

DarkMode.user.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @name:zh-CN 护眼模式
44
// @name:zh-TW 護眼模式
55
// @name:en Dark Mode
6-
// @version 1.5.3
6+
// @version 1.5.4
77
// @author X.I.U
88
// @description 简单有效的全网通用护眼模式(夜间模式、暗黑模式、深色模式)
99
// @description:zh-CN 简单有效的全网通用护眼模式(夜间模式、暗黑模式、深色模式)
@@ -363,7 +363,13 @@
363363
img[alt="[公式]"] {filter: none !important;}`,
364364
style_31_firefox = `html {filter: invert(${style_30[0]}%) !important; background-image: url(); text-shadow: 0 0 0 !important;}
365365
${menu_value('menu_customMode3_exclude')} {filter: invert(1) !important;}
366-
img[alt="[公式]"] {filter: none !important;}`;
366+
img[alt="[公式]"] {filter: none !important;}`,
367+
style_31_scrollbar = `::-webkit-scrollbar {height: 12px !important;}
368+
::-webkit-scrollbar-thumb {border-radius: 0;border-color: transparent;border-style: dashed;background-color: #3f4752 !important;background-clip: padding-box;transition: background-color .32s ease-in-out;}
369+
::-webkit-scrollbar-corner {background: #202020 !important;}
370+
::-webkit-scrollbar-track {background-color: #22272e !important;}
371+
::-webkit-scrollbar-thumb:hover {background: #3f4752 !important;}`;
372+
367373

368374
// Firefox 浏览器需要特殊对待
369375
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
@@ -395,7 +401,7 @@
395401
style += style_22;
396402
break;
397403
case 3:
398-
style += style_31;
404+
style += style_31 + style_31_scrollbar;
399405
if (location.hostname.indexOf('search.bilibili.com') > -1) {
400406
style += `ul.video-list img, ul.video-list .video-item .img .mask-video, ul.video-list .video-item .img .van-danmu, ul.video-list .video-item .img .van-framepreview {filter: none !important;}`
401407
} else if (location.hostname.indexOf('.bilibili.com') > -1) {

0 commit comments

Comments
 (0)