Skip to content

Commit

Permalink
update: clean URL
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Mar 11, 2024
1 parent c9cf836 commit 636b581
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 3.1.12

- 优化:URL参数净化

## 3.1.11

- 修复:修复直播页天选时刻蒙版bug
Expand Down
16 changes: 9 additions & 7 deletions src/rules/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ import {
* 净化掉vd_source参数会导致充电窗口载入失败
*/
const cleanURL = () => {
// 直播页只净化直播间
if (location.host === 'live.bilibili.com' && !isPageLiveRoom()) {
return
}
// 天选时刻iframe特殊处理
if (location.href.includes('live-lottery')) {
return
// 直播域名各种iframe页面(天选、抽奖)和活动页特殊处理
if (location.host === 'live.bilibili.com') {
if (
location.href.includes('live.bilibili.com/p/html') ||
location.href.includes('live.bilibili.com/activity') ||
location.href.includes('live.bilibili.com/blackboard')
) {
return
}
}
const keysToRemove = new Set([
'from_source',
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineConfig({
'*://message.bilibili.com/pages/nav/index_new_pc_sync',
'*://data.bilibili.com/*',
'*://cm.bilibili.com/*',
'*://link.bilibili.com/*',
'*://passport.bilibili.com/*',
'*://api.bilibili.com/*',
'*://api.*.bilibili.com/*',
Expand Down

0 comments on commit 636b581

Please sign in to comment.