Skip to content

Commit

Permalink
fix: commentFilter invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Apr 22, 2024
1 parent d786dd9 commit b2f5af6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 3.4.7

- 优化:播放页视频信息置底
- 修复:视频切换分P后评论过滤失效bug

## 3.4.6

Expand Down
8 changes: 6 additions & 2 deletions src/filters/commentFilter/pages/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,12 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) {
}

try {
waitForEle(document, '.reply-warp', (node: Node): boolean => {
return node instanceof HTMLElement && (node as HTMLElement).className === 'reply-warp'
waitForEle(document, '#comment, #comment-body, .playlist-comment', (node: Node): boolean => {
return (
node instanceof HTMLElement &&
(['comment', 'comment-body'].includes((node as HTMLElement).id) ||
(node as HTMLElement).className === 'playlist-comment')
)
}).then((ele) => {
if (ele) {
commentListContainer = ele
Expand Down

0 comments on commit b2f5af6

Please sign in to comment.