Skip to content

Commit

Permalink
update: hide qoe feedback and some chore
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Sep 27, 2024
1 parent 325a7af commit 6a7a749
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## 3.11.4

- 更新:播放页视频合集相关净化功能,适配网页变化
- 新增:评论区过滤 过滤只含@其他用户的评论
- 更新:播放页视频合集相关净化功能,适配网页变化
- 更新:播放页播放器弹窗净化功能

## 3.11.3

Expand Down
4 changes: 2 additions & 2 deletions src/filters/comment/dyn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ if (isPageDynamic()) {
ShadowInstance.addShadowObserver(
'BILI-COMMENTS',
new MutationObserver(() => {
checkRoot(true)
checkRoot(true).then().catch()
}),
{
subtree: true,
Expand All @@ -416,7 +416,7 @@ if (isPageDynamic()) {
ShadowInstance.addShadowObserver(
'BILI-COMMENT-REPLIES-RENDERER',
new MutationObserver(() => {
checkSub(true)
checkSub(true).then().catch()
}),
{
subtree: true,
Expand Down
4 changes: 2 additions & 2 deletions src/filters/comment/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) {
ShadowInstance.addShadowObserver(
'BILI-COMMENTS',
new MutationObserver(() => {
checkRoot(true)
checkRoot(true).then().catch()
}),
{
subtree: true,
Expand All @@ -423,7 +423,7 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) {
ShadowInstance.addShadowObserver(
'BILI-COMMENT-REPLIES-RENDERER',
new MutationObserver(() => {
checkSub(true)
checkSub(true).then().catch()
}),
{
subtree: true,
Expand Down
2 changes: 1 addition & 1 deletion src/filters/video/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) {
description: '相关视频 暂存数据过滤 (实验功能)\n自动替换 接下来播放\n启用时 修改其他视频过滤设置需刷新',
enableFunc: () => {
isRelatedFilterEnable = true
checkRelated()
checkRelated().then().catch()
},
disableFunc: () => {
isRelatedFilterEnable = false
Expand Down
3 changes: 2 additions & 1 deletion src/rules/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (isPageVideo() || isPagePlaylist()) {
* @see https://www.zhihu.com/question/381784377/answer/1099438784
* @see https://github.com/SocialSisterYi/bilibili-API-collect/issues/740
* @see https://socialsisteryi.github.io/bilibili-API-collect/docs/misc/bvid_desc.html
* @param bvid 输入BV号
* @param url 网址
* @returns 输出纯数字av号
*/
const bv2av = (url: string): string => {
Expand Down Expand Up @@ -621,6 +621,7 @@ if (isPageVideo() || isPagePlaylist() || isPageFestival()) {
description: '隐藏 播放效果调查',
defaultStatus: true,
itemCSS: `
.bpx-player-qoeFeedback,
.bili-qoeFeedback,
.bili-qoeFeedback-score,
.bili-qoeFeedback-vote {
Expand Down
12 changes: 0 additions & 12 deletions src/utils/tool.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
export const debounce = (fn: (...params: any[]) => any, wait: number, immed: boolean = false) => {
let timer: number | undefined = undefined
return function (this: any, ...args: any[]) {
if (timer === undefined && immed) {
fn.apply(this, args)
}
clearTimeout(timer)
timer = setTimeout(() => fn.apply(this, args), wait)
return timer
}
}

// 匹配BV号
const bvidPattern = /(BV[1-9A-HJ-NP-Za-km-z]+)/
export const matchBvid = (s: string): string | null => {
Expand Down

0 comments on commit 6a7a749

Please sign in to comment.