diff --git a/CHANGELOG.md b/CHANGELOG.md index ff056b47..dfa7ae84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## 3.11.4 -- 更新:播放页视频合集相关净化功能,适配网页变化 - 新增:评论区过滤 过滤只含@其他用户的评论 +- 更新:播放页视频合集相关净化功能,适配网页变化 +- 更新:播放页播放器弹窗净化功能 ## 3.11.3 diff --git a/src/filters/comment/dyn.ts b/src/filters/comment/dyn.ts index ffa66c3e..eb947579 100644 --- a/src/filters/comment/dyn.ts +++ b/src/filters/comment/dyn.ts @@ -399,7 +399,7 @@ if (isPageDynamic()) { ShadowInstance.addShadowObserver( 'BILI-COMMENTS', new MutationObserver(() => { - checkRoot(true) + checkRoot(true).then().catch() }), { subtree: true, @@ -416,7 +416,7 @@ if (isPageDynamic()) { ShadowInstance.addShadowObserver( 'BILI-COMMENT-REPLIES-RENDERER', new MutationObserver(() => { - checkSub(true) + checkSub(true).then().catch() }), { subtree: true, diff --git a/src/filters/comment/video.ts b/src/filters/comment/video.ts index 35832000..5de2fbd6 100644 --- a/src/filters/comment/video.ts +++ b/src/filters/comment/video.ts @@ -406,7 +406,7 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) { ShadowInstance.addShadowObserver( 'BILI-COMMENTS', new MutationObserver(() => { - checkRoot(true) + checkRoot(true).then().catch() }), { subtree: true, @@ -423,7 +423,7 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) { ShadowInstance.addShadowObserver( 'BILI-COMMENT-REPLIES-RENDERER', new MutationObserver(() => { - checkSub(true) + checkSub(true).then().catch() }), { subtree: true, diff --git a/src/filters/video/video.ts b/src/filters/video/video.ts index e60878b8..f82c26c9 100644 --- a/src/filters/video/video.ts +++ b/src/filters/video/video.ts @@ -498,7 +498,7 @@ if (isPageVideo() || isPageBangumi() || isPagePlaylist()) { description: '相关视频 暂存数据过滤 (实验功能)\n自动替换 接下来播放\n启用时 修改其他视频过滤设置需刷新', enableFunc: () => { isRelatedFilterEnable = true - checkRelated() + checkRelated().then().catch() }, disableFunc: () => { isRelatedFilterEnable = false diff --git a/src/rules/video.ts b/src/rules/video.ts index a3bdd9ef..2992f762 100644 --- a/src/rules/video.ts +++ b/src/rules/video.ts @@ -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 => { @@ -621,6 +621,7 @@ if (isPageVideo() || isPagePlaylist() || isPageFestival()) { description: '隐藏 播放效果调查', defaultStatus: true, itemCSS: ` + .bpx-player-qoeFeedback, .bili-qoeFeedback, .bili-qoeFeedback-score, .bili-qoeFeedback-vote { diff --git a/src/utils/tool.ts b/src/utils/tool.ts index 9bb856fd..3ec82e9f 100644 --- a/src/utils/tool.ts +++ b/src/utils/tool.ts @@ -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 => {