Skip to content

Commit 28c1d3a

Browse files
committed
修复 [暗黑模式] 样式一/二 部分 GIF 动图无法播放的问题
1 parent 60c29d7 commit 28c1d3a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Zhihu-Beautification.user.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 知乎美化
3-
// @version 1.1.16
3+
// @version 1.1.17
44
// @author X.I.U
55
// @description 宽屏显示、暗黑模式(4种)、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示
66
// @match *://www.zhihu.com/*
@@ -196,6 +196,8 @@ html[data-theme=dark] .PushNotifications-item a {color: #8ab5e0 !important;}
196196
html[data-theme=dark] img.UserCover-image, html[data-theme=dark] img.TitleImage {opacity: 0.7 !important;}
197197
/* 其他图片 */
198198
html[data-theme=dark] img {opacity: 0.9 !important;}
199+
/* GIF 动图除外 */
200+
html[data-theme=dark] .GifPlayer img {opacity: 1 !important;}
199201
200202
/* 边框 */
201203
html[data-theme=dark] .Topbar, html[data-theme=dark] .CommentsV2-footer, html[data-theme=dark] .Topstory-mainColumnCard .Card:not(.Topstory-tabCard), html[data-theme=dark] .NestComment:not(:last-child):after, html[data-theme=dark] .NestComment--rootComment:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .NestComment .NestComment--child:after, html[data-theme=dark] .CommentsV2-replyNum, html[data-theme=dark] .CommentItemV2:not(:first-child):after, html[data-theme=dark] .Tabs, html[data-theme=dark] .Popover-arrow:after {border-bottom: 1px solid #282d35 !important;}
@@ -220,6 +222,8 @@ html[data-theme=dark] .Reward-rewardBtn {color: #ffffff !important;}
220222
style_7 = `/* 暗黑模式(方案 2) */
221223
html {filter: invert(80%) !important;}
222224
img, .ZVideoItem-video, .ZVideo-video {filter: invert(1) !important;}
225+
.GifPlayer img, .GifPlayer.isPlaying video {filter: invert(1) !important;}
226+
.GifPlayer.isPlaying img.ztext-gif.GifPlayer-gif2mp4Image {filter: none !important;}
223227
`,
224228
style_8 = `/* 暗黑模式(方案 3) */
225229
html {filter: brightness(75%) !important;}

0 commit comments

Comments
 (0)