mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-09-26 22:49:14 +08:00
Merge pull request #5328 from kkkkkkkk566/preview-fixes
获取room_id兼容blanc原版直播间
This commit is contained in:
commit
2b97931ea0
@ -3,7 +3,11 @@ import { getCsrf, getUID } from '@/core/utils'
|
||||
|
||||
// 获取当前直播间号
|
||||
export function getLiveRoomId(): string {
|
||||
const matched = location.href.match(/live.bilibili.com\/(\d+)/)
|
||||
let matched = location.href.match(/live.bilibili.com\/(\d+)/)
|
||||
if (matched) {
|
||||
return matched[1]
|
||||
}
|
||||
matched = location.href.match(/live.bilibili.com\/blanc\/(\d+)/)
|
||||
return matched ? matched[1] : ''
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user