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 20, 2024
1 parent 88693f6 commit 5904737
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 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',
}
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
namespace: 'http://tampermonkey.net/',
version: '3.2.0',
description:
'净化 B站/哔哩哔哩 网页元素,去广告,URL净化,BV号转AV号,播放器净化,过滤推荐视频,提供300+项功能,定制自己的B站页面',
'净化 B站/哔哩哔哩 网页元素,去广告,BV号转AV号,播放器净化,过滤视频,过滤评论,提供300+项功能,定制自己的B站页面',
author: 'festoney8',
homepage: 'https://github.com/festoney8/bilibili-cleaner',
supportURL: 'https://github.com/festoney8/bilibili-cleaner',
Expand Down

0 comments on commit 5904737

Please sign in to comment.