Skip to content

Commit

Permalink
merge dev to main, v4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 authored Oct 12, 2024
2 parents 2da47e6 + 4aedc1b commit cd969f7
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 60 deletions.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-反馈.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assignees: festoney8

### 问题描述

- **出问题的页面**(首页 / 播放 / 番剧播放 / 搜索 / 动态 / 分区 / 直播 / 热门 / 空间 / 全部页面,**特殊情况请提供网址**
- **出问题的页面**如首页、播放页、动态页、搜索页等,特殊情况请给出网址

- **问题功能名**

Expand All @@ -21,16 +21,14 @@ assignees: festoney8

- **本插件版本**

- **操作系统**

- **浏览器及版本**

- **脚本管理器及版本(可选)**

### 初步检查(可选)
### 初步检查

- 可稳定复现问题:是 / 否 / 未知

- 在脚本管理器内,只启用本脚本时,仍出现问题:是 / 否 / 未知

- 禁用掉在 B 站页面生效的浏览器插件后,仍出现问题:是 / 否 / 未知
- 禁用掉对 B 站生效的浏览器插件后,仍出现问题:是 / 否 / 未知
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 4.0.2

- 更新:播放页 相关视频功能 适配页面变化
- 更新:播放页 视频过滤 适配页面变化
- 优化:直播页 弹幕栏相关功能
- 修复:空间页 评论过滤

## 4.0.1

- 新增:首页 移动负反馈按钮至底部 并恢复标题宽度
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

## 使用

Expand Down Expand Up @@ -270,5 +270,5 @@

## Contribution

- main branch 只用于发布测试版和稳定版
- dev-v4 branch 用于开发
- main 分支只用于发布测试版和稳定版
- dev 分支用于开发
8 changes: 3 additions & 5 deletions src/modules/filters/variety/comment/pages/space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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([`/./`])
Expand Down
13 changes: 10 additions & 3 deletions src/modules/filters/variety/video/pages/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 4 additions & 0 deletions src/modules/rules/live/groups/right.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ html[live-page-control-panel-icon-row] {
}
#chat-control-panel-vm {
height: 115px;
min-height: unset !important;
}

// 弹幕栏
Expand Down Expand Up @@ -213,6 +214,7 @@ html[live-page-chat-input-ctnr-send-btn] {
}
#chat-control-panel-vm {
height: fit-content !important;
min-height: unset !important;
}

// 弹幕栏
Expand All @@ -236,6 +238,7 @@ html[live-page-chat-input-ctnr] {
}
#chat-control-panel-vm {
height: fit-content !important;
min-height: unset !important;
}

// 弹幕栏
Expand All @@ -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;
}

// 弹幕栏
Expand Down
89 changes: 48 additions & 41 deletions src/modules/rules/video/groups/right.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
}

Expand Down
6 changes: 4 additions & 2 deletions src/modules/rules/video/groups/toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit cd969f7

Please sign in to comment.