Skip to content

Commit

Permalink
feat: live page activity auto jump blanc
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Jun 21, 2024
1 parent 68eb70a commit e891436
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## 3.7.2

- 新增:直播页 活动直播页自动跳转普通直播
- 优化:播放页 网页全屏页面滚动
- 更新:首页 隐藏banner,第一排按钮弹出菜单下置

## 3.7.1
Expand Down
18 changes: 18 additions & 0 deletions src/rules/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,24 @@ if (isPageLiveRoom()) {
}
`,
}),
// 活动直播页 自动跳转普通直播
new CheckboxItem({
itemID: 'activity-live-auto-jump',
description: '活动直播页 自动跳转普通直播 (实验功能)',
itemFunc: () => {
const jump = () => {
if (document.querySelector('#internationalHeader')) {
if (!location.href.includes('/blanc/')) {
window.location.href = location.href.replace(
'live.bilibili.com/',
'live.bilibili.com/blanc/',
)
}
}
}
document.readyState === 'complete' ? jump() : document.addEventListener('DOMContentLoaded', jump)
},
}),
]
liveGroupList.push(new Group('live-basic', '直播页 基本功能', basicItems))

Expand Down

0 comments on commit e891436

Please sign in to comment.