Skip to content

Commit

Permalink
feat: complete comment filter
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Mar 19, 2024
1 parent 88693f6 commit ed2d827
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/filters/commentFilter/pages/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ if (isPageVideo() || isPageBangumi()) {
const username = target.textContent?.trim()
if (username) {
e.preventDefault()
contextMenuInstance.registerMenu(`屏蔽用户:${username}`, () => {
contextMenuInstance.registerMenu(`屏蔽用户:${username}`, () => {
usernameAction.add(username)
})
contextMenuInstance.show(e.clientX, e.clientY)
Expand Down
5 changes: 0 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,30 +107,25 @@ const main = async () => {
const createPanelWithMode = (mode: string, groups: Group[]) => {
switch (panelInstance.mode) {
case undefined:
debug(`${mode} panel create start`)
panelInstance.create()
panelInstance.mode = mode
groups.forEach((e) => {
e.insertGroup()
e.insertGroupItems()
})
panelInstance.show()
debug(`${mode} panel create complete`)
break
case mode:
debug(`${mode} panel exist, just show it`)
panelInstance.show()
break
default:
debug(`${mode} panel replace other panel`)
panelInstance.clearGroups()
panelInstance.mode = mode
groups.forEach((e) => {
e.insertGroup()
e.insertGroupItems()
})
panelInstance.show()
debug(`${mode} panel replace complete`)
}
}
// 页面净化设置
Expand Down
2 changes: 1 addition & 1 deletion src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
enableDebugComponents: false,
enableDebugRules: false,
enableDebugVideoFilter: false,
enableDebugCommentFilter: true,
enableDebugCommentFilter: false,
// 标记视频过滤器检测过的视频
filterSign: 'bili-cleaner-filtered',
}

0 comments on commit ed2d827

Please sign in to comment.