Fix fold comment not work for CommentAreaV2 (fix #4905)

This commit is contained in:
the1812 2024-09-10 23:03:40 +08:00
parent 86fb4e0bc5
commit 3fb4a36688
2 changed files with 4 additions and 4 deletions

View File

@ -28,10 +28,13 @@
}
}
.bili-comment-container {
display: flex !important;
flex-direction: column !important;
&.bili-dyn-comment .reply-list {
padding-bottom: 8px !important;
}
.fold-comment {
order: 1;
font-size: 13px;
}
.at-panel,

View File

@ -32,10 +32,7 @@ const entry = async () => {
}
if (feedsCardsManager.managerType === 'v2') {
const getExistingComment = () => dq(card, commentSelector) as HTMLElement
const isCommentAreaReady = () => {
const existingComment = getExistingComment()
return existingComment !== null && dq(existingComment, 'bili-comments')
}
const isCommentAreaReady = () => getExistingComment() !== null
const handler = () => {
const button = dq(card, '.bili-dyn-action.comment') as HTMLElement
button?.click()