mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-09-26 22:49:14 +08:00
Fix live url (fix #5306)
This commit is contained in:
parent
6aded9e0e8
commit
300d535b0a
@ -1,5 +1,6 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { liveUrls } from '@/core/utils/urls'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
name: 'badgeKeepalive',
|
||||
@ -16,5 +17,5 @@ export const component = defineComponentMetadata({
|
||||
component: () => import('./BadgeKeepalive.vue').then(m => m.default),
|
||||
condition: () => Boolean(getUID()),
|
||||
},
|
||||
urlInclude: ['//live.bilibili.com'],
|
||||
urlInclude: liveUrls,
|
||||
})
|
||||
|
@ -3,8 +3,8 @@ import { getCsrf, getUID } from '@/core/utils'
|
||||
|
||||
// 获取当前直播间号
|
||||
export function getLiveRoomId(): string {
|
||||
const matched = location.href.match(/live.bilibili.com\/(\d+)/)
|
||||
return matched ? matched[1] : ''
|
||||
const matched = location.href.match(/live.bilibili.com\/(blanc\/)?(\d+)/)
|
||||
return matched ? matched[2] : ''
|
||||
}
|
||||
|
||||
export function validateRoomId(value: string): boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user