Skip to content

Commit

Permalink
Merge pull request #64 from festoney8/dev
Browse files Browse the repository at this point in the history
mrege dev to main, v3.4.4
  • Loading branch information
festoney8 authored Apr 13, 2024
2 parents 69e8d28 + 101c5a9 commit 46e28fe
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 14 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.4.4

- 新增:首页视频列表隐藏负反馈菜单(三个点),恢复标题宽度
- 更新:隐藏页底footer适配更多页面
- 新增:首页视频预览隐藏弹幕
- 新增:搜索页隐藏搜索结果顶部的版权作品

## 3.4.3

- 修复:空间页css
Expand Down
1 change: 0 additions & 1 deletion src/init.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { log } from './utils/logger'

/**
* 初始化项目
* 等待<html>出现+渲染, 用于插入节点
* pnpm run dev调试时,可能出现由于vite-plugin-monkey抢先监听document
* 导致脚本载入失败或载入缓慢的情况, 若刷新无效可先build再调试
Expand Down
2 changes: 0 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,8 @@ const main = async () => {
setInterval(() => {
const currURL = location.href
if (currURL !== lastURL) {
debug('url change detected')
RULE_GROUPS.forEach((e) => e.reloadGroup())
lastURL = currURL
debug('url change reload groups complete')
}
}, 500)

Expand Down
1 change: 0 additions & 1 deletion src/rules/bangumi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { CheckboxItem } from '../components/item'
import { debugRules as debug, error } from '../utils/logger'
import { isPageBangumi } from '../utils/page-type'

// GroupList
const bangumiGroupList: Group[] = []

/** 覆盖版权视频页分享按钮功能 (疑似firefox在bangumi page覆盖失败) */
Expand Down
1 change: 0 additions & 1 deletion src/rules/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Group } from '../components/group'
import { CheckboxItem, NumberItem } from '../components/item'
import { isPageChannel } from '../utils/page-type'

// GroupList
const channelGroupList: Group[] = []

if (isPageChannel()) {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ const basicItems = [
new CheckboxItem({
itemID: 'hide-footer',
description: '隐藏 页底footer',
itemCSS: `.international-footer {display: none !important;}`,
itemCSS: `.international-footer, #biliMainFooter, .biliMainFooterWrapper, .link-footer-ctnr {display: none !important;}`,
}),
]
commonGroupList.push(new Group('common-basic', '全站通用项 基本功能', basicItems))
Expand Down
1 change: 0 additions & 1 deletion src/rules/dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const dynamicUnfold = () => {
setInterval(unfold, 500)
}

// GroupList
const dynamicGroupList: Group[] = []

/**
Expand Down
14 changes: 13 additions & 1 deletion src/rules/homepage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Group } from '../components/group'
import { CheckboxItem, NumberItem, RadioItem } from '../components/item'
import { isPageHomepage } from '../utils/page-type'

// GroupList
const homepageGroupList: Group[] = []

if (isPageHomepage()) {
Expand Down Expand Up @@ -319,6 +318,13 @@ if (isPageHomepage()) {
font-size: 14px !important;
}`,
}),
// 隐藏 视频负反馈 恢复标题宽度
new CheckboxItem({
itemID: 'homepage-hide-no-interest',
description: '隐藏 视频负反馈 恢复标题宽度',
itemCSS: `.bili-video-card.enable-no-interest, .bili-live-card.enable-no-interest {--title-padding-right: 0;}
.bili-video-card__info--no-interest, .bili-live-card__info--no-interest {display: none !important;}`,
}),
// 隐藏 视频tag (已关注/1万点赞)
new CheckboxItem({
itemID: 'homepage-hide-up-info-icon',
Expand Down Expand Up @@ -366,6 +372,12 @@ if (isPageHomepage()) {
description: '隐藏 稍后再看按钮',
itemCSS: `.bili-watch-later {display: none !important;}`,
}),
// 隐藏 视频预览中的弹幕
new CheckboxItem({
itemID: 'homepage-hide-inline-player-danmaku',
description: '隐藏 视频预览中的弹幕',
itemCSS: `.bpx-player-row-dm-wrap, .bpx-player-cmd-dm-wrap {display: none !important;}`,
}),
// 隐藏 广告, 默认开启
new CheckboxItem({
itemID: 'homepage-hide-ad-card',
Expand Down
1 change: 0 additions & 1 deletion src/rules/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ const cleanLiveDanmaku = () => {
setInterval(clean, 500)
}

// GroupList
const liveGroupList: Group[] = []

// 直播页面规则, 只适用于直播间内, 不适用于直播首页
Expand Down
1 change: 0 additions & 1 deletion src/rules/popular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Group } from '../components/group'
import { CheckboxItem, RadioItem } from '../components/item'
import { isPagePopular } from '../utils/page-type'

// GroupList
const popularGroupList: Group[] = []

if (isPagePopular()) {
Expand Down
7 changes: 6 additions & 1 deletion src/rules/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Group } from '../components/group'
import { CheckboxItem } from '../components/item'
import { isPageSearch } from '../utils/page-type'

// GroupList
const searchGroupList: Group[] = []

if (isPageSearch()) {
Expand All @@ -21,6 +20,12 @@ if (isPageSearch()) {
defaultStatus: true,
itemCSS: `.video-list.row>div:has([href*="cm.bilibili.com"]) {display: none !important;}`,
}),
// 隐藏 搜索结果顶部的版权作品
new CheckboxItem({
itemID: 'hide-search-page-bangumi-pgc-list',
description: '隐藏 搜索结果顶部的版权作品',
itemCSS: `.bangumi-pgc-list {display: none !important;}`,
}),
// 隐藏 弹幕数量, 默认开启
new CheckboxItem({
itemID: 'hide-search-page-danmaku-count',
Expand Down
3 changes: 1 addition & 2 deletions src/rules/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ const coinDisableAutoLike = () => {
}
}

// GroupList
const videoGroupList: Group[] = []

// 普通播放页,稍后再看播放页,收藏夹播放页
Expand Down Expand Up @@ -345,7 +344,7 @@ if (isPageVideo() || isPagePlaylist() || isPageBnj()) {
// 隐藏 视频链接
new CheckboxItem({
itemID: 'video-page-hide-bpx-player-bili-link',
description: '隐藏 视频链接',
description: '隐藏 视频链接(稍后再看)',
itemCSS: `.bpx-player-video-area .bili-link {display: none !important;}`,
}),
// 隐藏 左上角 播放器内标题
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.4.3',
version: '3.4.4',
description:
'净化 B站/哔哩哔哩 网页元素,去广告,BV号转AV号,播放器净化,过滤视频,过滤评论,提供300+项功能,定制自己的B站页面',
author: 'festoney8',
Expand Down

0 comments on commit 46e28fe

Please sign in to comment.