You've already forked bilibili-subtitle
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
69e0497081 | ||
![]() |
8776186486 | ||
![]() |
d31c2d7b03 | ||
![]() |
1c5534fc82 |
@@ -1,3 +1 @@
|
|||||||
VITE_ENV=web-dev
|
VITE_ENV=web-dev
|
||||||
|
|
||||||
VITE_EXTENSION_ID=nejipfbcnfhckfpmlgibfommbnahchko
|
|
@@ -1,4 +1,3 @@
|
|||||||
NODE_ENV=production
|
NODE_ENV=production
|
||||||
|
|
||||||
VITE_ENV=chrome
|
VITE_ENV=chrome
|
||||||
VITE_EXTENSION_ID=bciglihaegkdhoogebcdblfhppoilclp
|
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "bilibili-subtitle",
|
"name": "bilibili-subtitle",
|
||||||
"version": "1.11.2",
|
"version": "1.11.4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "哔哩哔哩字幕列表",
|
"description": "哔哩哔哩字幕列表",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
@@ -245,7 +245,7 @@ const MoreBtn = (props: Props) => {
|
|||||||
下载音频(m4s)
|
下载音频(m4s)
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li className='hover:bg-accent'>
|
{/* <li className='hover:bg-accent'>
|
||||||
<a className='flex items-center' onClick={(e) => {
|
<a className='flex items-center' onClick={(e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
@@ -264,7 +264,7 @@ const MoreBtn = (props: Props) => {
|
|||||||
<AiFillWechat className='w-[20px] h-[20px] text-primary/75 bg-white rounded-sm p-0.5'/>
|
<AiFillWechat className='w-[20px] h-[20px] text-primary/75 bg-white rounded-sm p-0.5'/>
|
||||||
微信公众号(IndieKKY)
|
微信公众号(IndieKKY)
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li> */}
|
||||||
{/* <li className='hover:bg-accent'> */}
|
{/* <li className='hover:bg-accent'> */}
|
||||||
{/* <a className='flex items-center' onClick={(e) => { */}
|
{/* <a className='flex items-center' onClick={(e) => { */}
|
||||||
{/* e.preventDefault() */}
|
{/* e.preventDefault() */}
|
||||||
@@ -297,6 +297,17 @@ const MoreBtn = (props: Props) => {
|
|||||||
选项
|
选项
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{/* 官网 */}
|
||||||
|
<li className='hover:bg-accent'>
|
||||||
|
<a className='flex items-center' onClick={(e) => {
|
||||||
|
e.preventDefault()
|
||||||
|
e.stopPropagation()
|
||||||
|
openUrl('https://www.bibijun.cc')
|
||||||
|
}}>
|
||||||
|
<img alt='哔哔君' src='/favicon-128x128.png' className='w-[20px] h-[20px] bg-white rounded-sm p-0.5'/>
|
||||||
|
🏠 哔哔君官网
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</Popover>}
|
</Popover>}
|
||||||
</>
|
</>
|
||||||
|
@@ -62,7 +62,7 @@ class InjectMessaging<AllExtensionMessagesType extends ExtensionMessage, AllInje
|
|||||||
[K in AllInjectMessagesType['method']]: (params: Extract<AllInjectMessagesType, { method: K }>['params'], context: MethodContext) => Promise<any>
|
[K in AllInjectMessagesType['method']]: (params: Extract<AllInjectMessagesType, { method: K }>['params'], context: MethodContext) => Promise<any>
|
||||||
}) {
|
}) {
|
||||||
this.methods = methods
|
this.methods = methods
|
||||||
this.port = chrome.runtime.connect(import.meta.env.VITE_EXTENSION_ID, {
|
this.port = chrome.runtime.connect({
|
||||||
name: 'bilibili-inject',
|
name: 'bilibili-inject',
|
||||||
})
|
})
|
||||||
this.l1protocol = new Layer1Protocol<L2ReqMsg, L2ResMsg>(this.messageHandler, this.port)
|
this.l1protocol = new Layer1Protocol<L2ReqMsg, L2ResMsg>(this.messageHandler, this.port)
|
||||||
|
@@ -63,7 +63,7 @@ const useMessagingService = <AllAPPMessagesType extends AppMessage>(methods?: {
|
|||||||
}, [methods])
|
}, [methods])
|
||||||
|
|
||||||
const port = useMemo(() => {
|
const port = useMemo(() => {
|
||||||
return chrome.runtime.connect(import.meta.env.VITE_EXTENSION_ID, {
|
return chrome.runtime.connect({
|
||||||
name: 'bilibili-app',
|
name: 'bilibili-app',
|
||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
|
1
src/vite-env.d.ts
vendored
1
src/vite-env.d.ts
vendored
@@ -1,7 +1,6 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
interface ImportMetaEnv {
|
||||||
readonly VITE_EXTENSION_ID: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ImportMeta {
|
interface ImportMeta {
|
||||||
|
Reference in New Issue
Block a user