Skip to content

Commit ca586fd

Browse files
committed
优化 代码 (默认折叠邀请)
1 parent 55eed4a commit ca586fd

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Zhihu-Enhanced.user.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,10 +1344,7 @@ function questionInvitation(){
13441344

13451345
function start(){
13461346
removeHighlightLink(); // 移除高亮链接
1347-
if (location.hostname != 'zhuanlan.zhihu.com') {
1348-
collapsedAnswer(); // 一键收起回答
1349-
questionInvitation(); // 默认折叠邀请
1350-
}
1347+
if (location.hostname != 'zhuanlan.zhihu.com') {collapsedAnswer();} // 一键收起回答
13511348
closeFloatingComments(); // 快捷关闭悬浮评论(监听点击事件,点击网页两侧空白处)
13521349
blockKeywords('comment'); // 屏蔽指定关键词(评论)
13531350

@@ -1364,7 +1361,7 @@ function questionInvitation(){
13641361
}
13651362
setInterval(function(){topTime_('.ContentItem.AnswerItem', 'ContentItem-meta')}, 300); // 置顶显示时间
13661363
setTimeout(question_time, 300); // 问题创建时间
1367-
1364+
questionInvitation(); // 默认折叠邀请
13681365

13691366
} else if (location.pathname === '/search') { // 搜索结果页 //
13701367
collapsedNowAnswer('main div'); // 收起当前回答 + 快捷返回顶部

0 commit comments

Comments
 (0)