Skip to content

Commit bab3f93

Browse files
committed
修复 [收起当前回答/评论(点击两侧空白处)] 在部分回答下不起作用的问题
1 parent 97c4467 commit bab3f93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Zhihu-Enhanced.user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function collapsedNowAnswer(selectors) {
135135
}
136136
// 针对完全看不到 [收起回答] 按钮时(如 [头部区域],以及部分明明很长却不显示悬浮横条的回答)
137137
if (!answerCollapseButton_) {
138-
for (let el of document.querySelectorAll('.List-item')) { // 遍历所有回答主体元素
138+
for (let el of document.querySelectorAll('.List-item, .Card.AnswerCard')) { // 遍历所有回答主体元素
139139
if (isElementInViewport_(el)) { // 判断该回答是否在可视区域内
140140
// 固定的 [收起评论](先看看是否展开评论,即存在 [收起评论] 按钮)
141141
let commentCollapseButton = el.parentNode.querySelector('button.Button.ContentItem-action.Button--plain.Button--withIcon.Button--withLabel:first-of-type')

0 commit comments

Comments
 (0)