Skip to content

Commit abcf984

Browse files
committed
新增 屏蔽部分广告内容
1 parent c72ee2e commit abcf984

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Zhihu-Beautification.user.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// ==UserScript==
22
// @name 知乎美化
3-
// @version 1.1.1
3+
// @version 1.1.2
44
// @author X.I.U
55
// @description 宽屏显示、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示
66
// @match *://www.zhihu.com/*
@@ -69,7 +69,13 @@
6969
// 添加样式
7070
function addStyle() {
7171
let style = `/* 屏蔽登录提示 */
72-
.Question-mainColumnLogin {display: none;}
72+
.Question-mainColumnLogin {display: none !important;}
73+
/* 屏蔽首页广告 */
74+
.TopstoryItem--advertCard {display: none !important;}
75+
/* 屏蔽回答页广告 */
76+
.Pc-card.Card {display: none !important;}
77+
/* 屏蔽文章页推荐文章 */
78+
.Recommendations-Main {display: none !important;}
7379
`,
7480
style_1 = `/* 宽屏显示 */
7581
.GlobalSideBar,.Question-sideColumn,.ContentLayout-sideColumn,.SearchSideBar,.Card.QuestionHeaderTopicMeta {

0 commit comments

Comments
 (0)