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 0e49e91
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<image src="./images/logo.png" height="120"></image>
<h1>bilibili 页面净化大师</h1>
<div>高度定制化的 bilibili 网页净化插件,提供 300+ 个功能开关,深度净化页面</div>
<div>支持「精简功能、去广告、BV号转AV号、播放器净化、过滤视频、全站黑白名单」等多种细节功能</div>
<div>支持「精简功能、去广告、播放器净化、过滤视频、过滤评论、全站黑白名单」等功能</div>
<br>

[安装使用](#安装) / [功能介绍](#功能介绍) / [浏览器适配](#浏览器适配) / [净化效果](#净化效果对比) / [插件兼容](#与其他-bilibili-插件的兼容性) / [数据备份](#数据导入与导出)
Expand Down
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 0e49e91

Please sign in to comment.