mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
27 lines
998 B
TypeScript
27 lines
998 B
TypeScript
import { defineComponentMetadata } from '@/components/define'
|
|
import { styledComponentEntry } from '@/components/styled-component'
|
|
import { select } from '@/core/spin-query'
|
|
import { mountVueComponent } from '@/core/utils'
|
|
import { useScopedConsole } from '@/core/utils/log'
|
|
|
|
const entry = async () => {
|
|
const console = useScopedConsole('extendFeedsLive')
|
|
const container = (await select(
|
|
'.bili-dyn-home--member aside.left section:last-child',
|
|
)) as HTMLElement
|
|
if (!container) {
|
|
console.error('container not found')
|
|
}
|
|
const LiveList = await import('./LiveList.vue').then(m => m.default)
|
|
const liveList = mountVueComponent(LiveList)
|
|
container.appendChild(liveList.$el)
|
|
}
|
|
|
|
export const component = defineComponentMetadata({
|
|
name: 'extendFeedsLive',
|
|
displayName: '直播信息扩充',
|
|
entry: styledComponentEntry(() => import('./extend-feeds-live.scss'), entry),
|
|
tags: [componentsTags.feeds, componentsTags.live],
|
|
urlInclude: [/^https:\/\/t\.bilibili\.com\/$/],
|
|
})
|