From d10b2a8a1691364b1b0685d908cc31f61061d71f Mon Sep 17 00:00:00 2001 From: festoney8 Date: Thu, 10 Oct 2024 23:23:52 +0800 Subject: [PATCH 1/5] update: video page right container items (#156) --- CHANGELOG.md | 4 + src/modules/rules/video/groups/right.scss | 89 +++++++++++---------- src/modules/rules/video/groups/toolbar.scss | 6 +- vite.config.ts | 2 +- 4 files changed, 57 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4fd731..a97ea78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 4.0.2 + +- 更新:播放页 相关视频功能 适配页面变化 + ## 4.0.1 - 新增:首页 移动负反馈按钮至底部 并恢复标题宽度 diff --git a/src/modules/rules/video/groups/right.scss b/src/modules/rules/video/groups/right.scss index 1f65d5b..25ea5b9 100644 --- a/src/modules/rules/video/groups/right.scss +++ b/src/modules/rules/video/groups/right.scss @@ -32,23 +32,26 @@ html[video-page-right-container-sticky-disable] { // 隐藏 广告 html[video-page-hide-right-container-ad] { - #slide_ad { - display: none !important; - } - .ad-report.video-card-ad-small { - display: none !important; - } - .video-page-special-card-small { - display: none !important; - } - #reco_list { - margin-top: 0 !important; + .right-container { + #slide_ad { + display: none !important; + } + .ad-report.video-card-ad-small { + display: none !important; + } + .video-page-special-card-small { + display: none !important; + } + #reco_list, + .recommend-list-v1 { + margin-top: 0 !important; + } } } // 隐藏 游戏推荐 html[video-page-hide-right-container-video-page-game-card-small] { - #reco_list .video-page-game-card-small { + .right-container .video-page-game-card-small { display: none !important; } } @@ -65,28 +68,28 @@ html[video-page-hide-right-container-danmaku] { // 隐藏 自动连播按钮 html[video-page-hide-right-container-reco-list-next-play-next-button] { - #reco_list .next-play .next-button { - display: none !important; + .right-container .next-play { + .next-button, + .continuous-btn { + display: none !important; + } } } // 隐藏 接下来播放 html[video-page-hide-right-container-reco-list-next-play] { - #reco_list .next-play { + .right-container .next-play { display: none !important; } - #reco_list .rec-list { + .right-container .rec-list { margin-top: 0 !important; } } // 优化 视频合集列表高度 html[video-page-hide-right-container-section-height] { - .base-video-sections-v1 .video-sections-content-list { - height: fit-content !important; - max-height: 350px !important; - } - .video-sections-v1 .video-sections-content-list { + .video-sections-content-list, + .video-pod__body { height: fit-content !important; max-height: 350px !important; } @@ -176,7 +179,7 @@ html[video-page-right-container-set-info-bottom] { // 隐藏 相关视频 视频时长 html[video-page-hide-right-container-duration] { - #reco_list .duration { + .right-container .card-box .duration { display: none !important; } @@ -188,7 +191,7 @@ html[video-page-hide-right-container-duration] { // 隐藏 相关视频 稍后再看按钮 html[video-page-hide-right-container-reco-list-watch-later-video] { - #reco_list .watch-later-video { + .right-container .watch-later-video { display: none !important; } @@ -200,20 +203,22 @@ html[video-page-hide-right-container-reco-list-watch-later-video] { // 隐藏 相关视频 UP主 html[video-page-hide-right-container-reco-list-rec-list-info-up] { - #reco_list .info .upname { - visibility: hidden !important; - } - #reco_list .info { + .right-container .info { + .upname { + visibility: hidden !important; + } + display: flex; flex-direction: column; justify-content: space-between; } // 适配watchlater, favlist - .recommend-list-container .info .upname { - display: none !important; - } .recommend-list-container .info { + .upname { + display: none !important; + } + display: flex; flex-direction: column; justify-content: space-between; @@ -222,10 +227,11 @@ html[video-page-hide-right-container-reco-list-rec-list-info-up] { // 隐藏 相关视频 播放和弹幕 html[video-page-hide-right-container-reco-list-rec-list-info-plays] { - #reco_list .info .playinfo { - display: none !important; - } - #reco_list .info { + .right-container .info { + .playinfo { + display: none !important; + } + display: flex; flex-direction: column; justify-content: space-between; @@ -244,22 +250,23 @@ html[video-page-hide-right-container-reco-list-rec-list-info-plays] { // 隐藏 全部相关视频 html[video-page-hide-right-container-reco-list-rec-list] { - #reco_list .rec-list { - display: none !important; - } - #reco_list .rec-footer { - display: none !important; + .right-container { + .rec-list, + .rec-footer { + display: none !important; + } } // 适配watchlater, favlist - .recommend-list-container { + .playlist-container--right .recommend-list-container { display: none !important; } } // 隐藏 活动banner html[video-page-hide-right-container-right-bottom-banner] { - #right-bottom-banner { + #right-bottom-banner, + .right-container .right-bottom-banner { display: none !important; } diff --git a/src/modules/rules/video/groups/toolbar.scss b/src/modules/rules/video/groups/toolbar.scss index fbdf22a..755f2fe 100644 --- a/src/modules/rules/video/groups/toolbar.scss +++ b/src/modules/rules/video/groups/toolbar.scss @@ -57,14 +57,16 @@ html[video-page-hide-below-info-tag] { // 隐藏 活动宣传 html[video-page-hide-below-activity-vote] { - #activity_vote { + #activity_vote, + .activity-m-v1 { display: none !important; } } // 隐藏 广告banner html[video-page-hide-below-bannerAd] { - #bannerAd { + #bannerAd, + .left-container .left-banner { display: none !important; } } diff --git a/vite.config.ts b/vite.config.ts index 1d51607..6707884 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ userscript: { name: 'bilibili 页面净化大师', namespace: 'http://tampermonkey.net/', - version: '4.0.1', + version: '4.0.2', description: '净化 B站/哔哩哔哩 页面,支持「精简功能、播放器净化、过滤视频、过滤评论、全站黑白名单」,提供 300+ 功能,定制自己的 B 站', author: 'festoney8', From 514fe60f772f3104ffb41ea30c21b258d9bdaa63 Mon Sep 17 00:00:00 2001 From: festoney8 Date: Fri, 11 Oct 2024 20:58:45 +0800 Subject: [PATCH 2/5] fix: space page comment filter typo --- CHANGELOG.md | 1 + src/modules/filters/variety/comment/pages/space.ts | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a97ea78..e6e96f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.0.2 - 更新:播放页 相关视频功能 适配页面变化 +- 修复:空间页 评论过滤 ## 4.0.1 diff --git a/src/modules/filters/variety/comment/pages/space.ts b/src/modules/filters/variety/comment/pages/space.ts index da4c036..f515d26 100644 --- a/src/modules/filters/variety/comment/pages/space.ts +++ b/src/modules/filters/variety/comment/pages/space.ts @@ -229,11 +229,9 @@ class CommentFilterSpace implements IMainFilter { 'AI总结视频', 'AI工具集', ] - this.commentUsernameFilter.setParam( - BiliCleanerStorage.get(`BILICLEANER_${GM_KEYS.black.username.valueKey}`, []), - ) - this.commentContentFilter.setParam(BiliCleanerStorage.get(`BILICLEANER_${GM_KEYS.black.content.valueKey}`, [])) - this.commentLevelFilter.setParam(BiliCleanerStorage.get(`BILICLEANER_${GM_KEYS.black.level.valueKey}`, 0)) + this.commentUsernameFilter.setParam(BiliCleanerStorage.get(GM_KEYS.black.username.valueKey, [])) + this.commentContentFilter.setParam(BiliCleanerStorage.get(GM_KEYS.black.content.valueKey, [])) + this.commentLevelFilter.setParam(BiliCleanerStorage.get(GM_KEYS.black.level.valueKey, 0)) this.commentBotFilter.setParam(bots) this.commentCallBotFilter.setParam(bots) this.commentCallUserFilter.setParam([`/./`]) From 1b95dec0b45e4c85c61f0bca6f16d3a1c176a32c Mon Sep 17 00:00:00 2001 From: festoney8 Date: Fri, 11 Oct 2024 22:12:07 +0800 Subject: [PATCH 3/5] fix: video page video filter --- CHANGELOG.md | 1 + src/modules/filters/variety/video/pages/video.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6e96f0..1e87ab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 4.0.2 - 更新:播放页 相关视频功能 适配页面变化 +- 更新:播放页 视频过滤 适配页面变化 - 修复:空间页 评论过滤 ## 4.0.1 diff --git a/src/modules/filters/variety/video/pages/video.ts b/src/modules/filters/variety/video/pages/video.ts index 979eb91..2c3a6fc 100644 --- a/src/modules/filters/variety/video/pages/video.ts +++ b/src/modules/filters/variety/video/pages/video.ts @@ -208,9 +208,16 @@ class VideoFilterVideo implements IMainFilter { // } observe() { - waitForEle(document, '#reco_list, .recommend-list-container', (node: HTMLElement): boolean => { - return node.id === 'reco_list' || node.className === 'recommend-list-container' - }).then((ele) => { + waitForEle( + document, + '#reco_list, .recommend-list-v1, .recommend-list-container', + (node: HTMLElement): boolean => { + return ( + node.id === 'reco_list' || + ['recommend-list-v1', 'recommend-list-container'].includes(node.className) + ) + }, + ).then((ele) => { if (!ele) { return } From 76fb7e745906603a67e226cd014568b1982099f0 Mon Sep 17 00:00:00 2001 From: festoney8 Date: Fri, 11 Oct 2024 23:40:40 +0800 Subject: [PATCH 4/5] chore: update issue template --- ".github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md" | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git "a/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md" "b/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md" index 7938ea9..e858c95 100644 --- "a/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md" +++ "b/.github/ISSUE_TEMPLATE/bug-\345\217\215\351\246\210.md" @@ -9,7 +9,7 @@ assignees: festoney8 ### 问题描述 -- **出问题的页面**:(首页 / 播放 / 番剧播放 / 搜索 / 动态 / 分区 / 直播 / 热门 / 空间 / 全部页面,**特殊情况请提供网址**) +- **出问题的页面**:如首页、播放页、动态页、搜索页等,特殊情况请给出网址 - **问题功能名**: @@ -21,16 +21,14 @@ assignees: festoney8 - **本插件版本**: -- **操作系统**: - - **浏览器及版本**: - **脚本管理器及版本(可选)**: -### 初步检查(可选) +### 初步检查 - 可稳定复现问题:是 / 否 / 未知 - 在脚本管理器内,只启用本脚本时,仍出现问题:是 / 否 / 未知 -- 禁用掉在 B 站页面生效的浏览器插件后,仍出现问题:是 / 否 / 未知 +- 禁用掉对 B 站生效的浏览器插件后,仍出现问题:是 / 否 / 未知 From 4aedc1bc9ec1f9f75dc3ea3f368f0a546fea5b45 Mon Sep 17 00:00:00 2001 From: festoney8 Date: Sat, 12 Oct 2024 01:26:16 +0800 Subject: [PATCH 5/5] update: live page style --- CHANGELOG.md | 1 + README.md | 6 +++--- src/modules/rules/live/groups/right.scss | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e87ab7..d31b5d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - 更新:播放页 相关视频功能 适配页面变化 - 更新:播放页 视频过滤 适配页面变化 +- 优化:直播页 弹幕栏相关功能 - 修复:空间页 评论过滤 ## 4.0.1 diff --git a/README.md b/README.md index b5c6f7e..ff44347 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ ### 测试版:[Release 安装](https://github.com/festoney8/bilibili-cleaner/releases/) -- 开发版:[CI Build](https://github.com/festoney8/bilibili-cleaner/actions/workflows/dev-v4-ci.yml?query=is%3Asuccess) +- 开发版:[CI Build](https://github.com/festoney8/bilibili-cleaner/actions/workflows/dev-ci.yml?query=is%3Asuccess) ## 使用 @@ -270,5 +270,5 @@ ## Contribution -- main branch 只用于发布测试版和稳定版 -- dev-v4 branch 用于开发 +- main 分支只用于发布测试版和稳定版 +- dev 分支用于开发 diff --git a/src/modules/rules/live/groups/right.scss b/src/modules/rules/live/groups/right.scss index e14da3d..3ebbe1a 100644 --- a/src/modules/rules/live/groups/right.scss +++ b/src/modules/rules/live/groups/right.scss @@ -181,6 +181,7 @@ html[live-page-control-panel-icon-row] { } #chat-control-panel-vm { height: 115px; + min-height: unset !important; } // 弹幕栏 @@ -213,6 +214,7 @@ html[live-page-chat-input-ctnr-send-btn] { } #chat-control-panel-vm { height: fit-content !important; + min-height: unset !important; } // 弹幕栏 @@ -236,6 +238,7 @@ html[live-page-chat-input-ctnr] { } #chat-control-panel-vm { height: fit-content !important; + min-height: unset !important; } // 弹幕栏 @@ -255,6 +258,7 @@ html[live-page-chat-input-ctnr] { html[live-page-chat-control-panel] { #chat-control-panel-vm { display: none !important; + min-height: unset !important; } // 弹幕栏