Skip to content

Commit

Permalink
Merge pull request #71 from festoney8/dev
Browse files Browse the repository at this point in the history
merge dev to main, v3.5.3
  • Loading branch information
festoney8 committed May 11, 2024
2 parents 729f009 + 98fa1a6 commit 191f651
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 46 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## 3.5.3

- 新增:首页隐藏稍后再看提示语
- 新增:动态页隐藏抽奖动态
- 移除:直播页顶栏右侧动态、签到、互动,适配网页变动
- 移除:版权播放页用手机看选项,适配网页变动

## 3.5.2

- 新增:动态页 交换左栏和右栏位置
Expand Down
20 changes: 18 additions & 2 deletions NOTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
今日话题
```

同时建议用 UP 主昵称关键词屏蔽 `/今日话题|话题酱/`

### 5. 含日语的标题

```
Expand All @@ -60,11 +62,25 @@
- 可参考:https://space.bilibili.com/94510621/video

```
/大型纪录片.*《|》.*大型纪录片|五星上将|麦克阿瑟/
科目三
```

```
科目三
猫meme
```

```
/是什么梗|梗百科|梗指南/
```

```
/大型[纪记]录片.*《|》.*大型[纪记]录片|五星上将|麦克阿瑟/
```

加强版:

```
/大型(..)?[纪记]录片|小型[纪记]录片|五星上将|麦克阿瑟/
```

### 8. 二游:原神
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
- 启用 UP 主过滤后,右键单击 UP 主即可屏蔽;启用 BV 号过滤后,右键单击视频标题即可屏蔽
- **每个页面有独立的功能开关,但黑名单、白名单全站共用一份**
- **白名单权限高于黑名单,命中白名单的视频不会被隐藏**
- 「标题关键词过滤」和「标题关键词白名单」大小写不敏感。均支持正则(大小写不敏感),正则用 `/ ... /` 括起来,如:`/abc|\d+/`
- 「标题关键词过滤」和「标题关键词白名单」大小写不敏感。均支持正则,正则用 `/ ... /` 括起来,如:`/abc|\d+/`,无需flag(一律默认`iv`模式,大小写不敏感)
- 已知bug:视频过滤在带`index.html`后缀的首页不生效,请使用无后缀首页 `https://www.bilibili.com/`

> [!NOTE]
Expand All @@ -85,7 +85,7 @@

- 评论过滤支持「用户名、关键词」两种模式
- 启用用户名过滤后,在评论区右键单击用户名即可屏蔽
- 关键词黑名单大小写不敏感。支持正则(大小写不敏感),语法:`/abc|\d+/`
- 关键词黑名单大小写不敏感。支持正则,语法:`/abc|\d+/`,无需flag(一律默认`iv`模式,大小写不敏感)
- **白名单权限高于黑名单,命中白名单的评论不会被隐藏**

> [!NOTE]
Expand Down Expand Up @@ -194,7 +194,6 @@
- **隐藏首页banner**

- 使用「Evolved 夜间模式」时,开启 Evolved 的「隐藏顶部横幅」,关闭本脚本的「隐藏 banner」

- 使用「Evolved 顶栏」时,开启 Evolved 的「隐藏顶部横幅」,关闭本脚本的「隐藏 banner」
- 不使用「Evolved 顶栏」时,关闭 Evolved 的「隐藏顶部横幅」,开启本脚本的「隐藏 banner」

Expand Down
7 changes: 0 additions & 7 deletions src/rules/bangumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,6 @@ if (isPageBangumi()) {
defaultStatus: true,
itemCSS: `#share-container-id [class^='Share_share'] {display: none !important;}`,
}),
// bangumi独有项:隐藏 用手机观看, 默认开启
new CheckboxItem({
itemID: 'bangumi-page-hide-watch-on-phone',
description: '隐藏 用手机观看 ★',
defaultStatus: true,
itemCSS: `.toolbar span:has(>[class^='Phone_mobile']) {display: none !important;}`,
}),
// bangumi独有项:隐藏 一起看, 默认开启
new CheckboxItem({
itemID: 'bangumi-page-hide-watch-together',
Expand Down
14 changes: 12 additions & 2 deletions src/rules/dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (isPageDynamic()) {
new CheckboxItem({
itemID: 'hide-dynamic-page-bili-dyn-my-info',
description: '隐藏 个人信息框',
itemCSS: `section:has(> .bili-dyn-my-info) {display: none !important;}
itemCSS: `aside.left section {display: none !important;}
.bili-dyn-live-users {top: 15px !important;}`,
}),
// 隐藏 直播中Logo
Expand Down Expand Up @@ -111,7 +111,11 @@ if (isPageDynamic()) {
new CheckboxItem({
itemID: 'expand-dynamic-page-bili-dyn-width',
description: '扩增 中栏宽度',
itemCSS: `main {flex-grow: 0.8 !important;}`,
itemCSS: `
main {flex-grow: 0.8 !important;}
/* 限制查看图片时img高度 */
.bili-album__watch__content img {max-height: 80vh !important;}
`,
}),
// 双行显示 UP 主列表
new CheckboxItem({
Expand Down Expand Up @@ -215,6 +219,12 @@ if (isPageDynamic()) {
margin: 0 !important;
}`,
}),
// 隐藏 抽奖动态(含转发)
new CheckboxItem({
itemID: 'hide-dynamic-page-bili-dyn-lottery',
description: '隐藏 抽奖动态(含转发)',
itemCSS: `.bili-dyn-list__item:has([data-type="lottery"]) {display: none !important;}`,
}),
// 隐藏 转发的动态
new CheckboxItem({
itemID: 'hide-dynamic-page-bili-dyn-forward',
Expand Down
6 changes: 6 additions & 0 deletions src/rules/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ if (isPageHomepage()) {
defaultStatus: true,
itemCSS: `main:not(:has(.bilibili-app-recommend-root)) .bili-video-card__stats--item:nth-child(2) {visibility: hidden;}`,
}),
// 隐藏 稍后再看提示语
new CheckboxItem({
itemID: 'homepage-hide-bili-watch-later-tip',
description: '隐藏 稍后再看提示语',
itemCSS: `.bili-watch-later__tip--lab {display: none !important;}`,
}),
// 隐藏 稍后再看按钮
new CheckboxItem({
itemID: 'homepage-hide-bili-watch-later',
Expand Down
29 changes: 2 additions & 27 deletions src/rules/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,12 +479,6 @@ if (isPageLiveHome() || isPageLiveRoom()) {
description: '隐藏 直播',
itemCSS: `#main-ctnr .dp-table-cell a[name="live"] {display: none !important;}`,
}),
// 隐藏 全部
new CheckboxItem({
itemID: 'live-page-header-all',
description: '隐藏 全部',
itemCSS: `#main-ctnr .dp-table-cell a[name="all"] {display: none !important;}`,
}),
// 隐藏 网游
new CheckboxItem({
itemID: 'live-page-header-net-game',
Expand Down Expand Up @@ -593,10 +587,10 @@ if (isPageLiveHome() || isPageLiveRoom()) {
description: '隐藏 搜索框 bilibili热搜',
itemCSS: `#nav-searchform .trending {display: none !important;}`,
}),
// 隐藏 关闭搜索框
// 隐藏 整个搜索框
new CheckboxItem({
itemID: 'live-page-header-search-block',
description: '隐藏 关闭搜索框',
description: '隐藏 整个搜索框',
itemCSS: `#nav-searchform {display: none !important;}`,
}),
]
Expand All @@ -610,25 +604,6 @@ if (isPageLiveHome() || isPageLiveRoom()) {
description: '隐藏 头像',
itemCSS: `#right-part .user-panel {display: none !important;}`,
}),
// 隐藏 动态
new CheckboxItem({
itemID: 'live-page-header-dynamic',
description: '隐藏 动态',
itemCSS: `#right-part .shortcut-item:has(.link-panel-ctnr) {display: none !important;}`,
}),
// 隐藏 签到
new CheckboxItem({
itemID: 'live-page-header-checkin',
description: '隐藏 签到',
itemCSS: `#right-part .shortcut-item:has(.calendar-checkin) {display: none !important;}`,
}),
// 隐藏 幻星互动, 默认开启
new CheckboxItem({
itemID: 'live-page-header-interact',
description: '隐藏 幻星互动',
defaultStatus: true,
itemCSS: `#right-part .shortcut-item:has(.fanbox-panel-ctnr) {display: none !important;}`,
}),
// 隐藏 关注
new CheckboxItem({
itemID: 'live-page-header-follow-panel',
Expand Down
19 changes: 16 additions & 3 deletions src/rules/popular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ if (isPagePopular()) {
'popular-layout-5-column',
'popular-layout-6-column',
],
itemCSS: `.cm-module {display: none !important;}`,
defaultStatus: true,
}),
// 强制使用 4 列布局
Expand All @@ -182,7 +183,11 @@ if (isPagePopular()) {
'popular-layout-5-column',
'popular-layout-6-column',
],
itemCSS: `/* 页面宽度 */
itemCSS: `
.cm-module {
display: none !important
}
/* 页面宽度 */
@media (min-width: 1300px) and (max-width: 1399.9px) {
.popular-container {
max-width: 1180px !important;
Expand Down Expand Up @@ -345,7 +350,11 @@ if (isPagePopular()) {
'popular-layout-5-column',
'popular-layout-6-column',
],
itemCSS: `/* 页面宽度 */
itemCSS: `
.cm-module {
display: none !important;
}
/* 页面宽度 */
@media (min-width: 1300px) and (max-width: 1399.9px) {
.popular-container {
max-width: 1180px !important;
Expand Down Expand Up @@ -508,7 +517,11 @@ if (isPagePopular()) {
'popular-layout-5-column',
'popular-layout-6-column',
],
itemCSS: `/* 页面宽度 */
itemCSS: `
.cm-module {
display: none !important;
}
/* 页面宽度 */
@media (min-width: 1300px) and (max-width: 1399.9px) {
.popular-container {
max-width: 1180px !important;
Expand Down
4 changes: 3 additions & 1 deletion src/rules/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,9 @@ if (isPageVideo() || isPagePlaylist()) {
itemID: 'video-page-hide-right-container-section-next-btn',
description: '隐藏 视频合集 自动连播',
itemCSS: `.base-video-sections-v1 .next-button {display: none !important;}
.video-sections-head_first-line .next-button {display: none !important;}`,
.video-sections-head_first-line .first-line-left {max-width: 100% !important;}
.video-sections-head_first-line .first-line-title {max-width: unset !important;}
.video-sections-head_first-line .first-line-right {display: none !important;}`,
}),
// 隐藏 视频合集 播放量
new CheckboxItem({
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig({
userscript: {
name: 'bilibili 页面净化大师',
namespace: 'http://tampermonkey.net/',
version: '3.5.2',
version: '3.5.3',
description:
'净化 B站/哔哩哔哩 页面,支持「精简功能、播放器净化、过滤视频、过滤评论、全站黑白名单」,提供 300+ 功能,定制自己的 B 站',
author: 'festoney8',
Expand Down

0 comments on commit 191f651

Please sign in to comment.