mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
27 lines
581 B
Vue
27 lines
581 B
Vue
<template>
|
|
<a :href="href" tabindex="-1">
|
|
<DefaultWidget name="返回原版直播间" icon="mdi-arrow-left-circle-outline" />
|
|
</a>
|
|
</template>
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue'
|
|
import { DefaultWidget } from '@/ui'
|
|
|
|
export default defineComponent({
|
|
components: {
|
|
DefaultWidget,
|
|
},
|
|
data() {
|
|
const match = document.URL.match(/^https:\/\/live\.bilibili\.com\/([\d]+)/)
|
|
if (!match) {
|
|
return {
|
|
href: document.URL,
|
|
}
|
|
}
|
|
return {
|
|
href: `https://live.bilibili.com/blanc/${match[1]}`,
|
|
}
|
|
},
|
|
})
|
|
</script>
|