Skip to content

Commit d56c52d

Browse files
committed
优化 代码
1 parent 9c83724 commit d56c52d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Zhihu-Beautification.user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// ==UserScript==
22
// @name 知乎美化
3-
// @version 1.1.0
3+
// @version 1.1.1
44
// @author X.I.U
5-
// @description 宽屏显示、隐藏文章开头大图、调整图片最大高度、浏览回答向下翻时自动隐藏标题、文章编辑页面与实际文章宽度一致、屏蔽登录提示
5+
// @description 宽屏显示、隐藏文章开头大图、调整图片最大高度、向下翻时自动隐藏顶栏、文章编辑页面与实际文章宽度一致、屏蔽登录提示
66
// @match *://www.zhihu.com/*
77
// @match *://zhuanlan.zhihu.com/p/*
88
// @icon https://static.zhihu.com/heifetz/favicon.ico
@@ -22,7 +22,7 @@
2222
['menu_widescreenDisplay', '宽屏显示', '一键收起回答', true],
2323
['menu_picHeight', '调整图片最大高度', '调整图片最大高度', true],
2424
['menu_postimg', '隐藏文章开头大图', '隐藏文章开头大图', true],
25-
['menu_hideTitle', '隐藏浏览回答标题', '隐藏浏览回答标题', true]
25+
['menu_hideTitle', '向下翻时自动隐藏顶栏', '向下翻时自动隐藏顶栏', true]
2626
], menu_ID = [];
2727
for (let i=0;i<menu_ALL.length;i++){ // 如果读取到的值为 null 就写入默认值
2828
if (GM_getValue(menu_ALL[i][0]) == null){GM_setValue(menu_ALL[i][0], menu_ALL[i][3])};
@@ -100,7 +100,7 @@
100100
font-size: 24px;
101101
}
102102
`,
103-
style_4 = `/* 浏览回答时,向下翻隐藏顶栏(问题的标题)*/
103+
style_4 = `/* 向下翻时自动隐藏顶栏*/
104104
header.is-hidden {
105105
display: none;
106106
}
@@ -124,7 +124,7 @@ header.is-hidden {
124124
if (menu_value('menu_postimg')) {
125125
style += style_2;
126126
}
127-
// 浏览回答向下翻时自动隐藏标题
127+
// 向下翻时自动隐藏顶栏
128128
if (menu_value('menu_hideTitle')) {
129129
style += style_4;
130130
}

0 commit comments

Comments
 (0)