You've already forked bilibili-subtitle
fix
This commit is contained in:
@@ -27,10 +27,9 @@ export default defineManifest(async (env) => ({
|
|||||||
"service_worker": "src/chrome/background.ts",
|
"service_worker": "src/chrome/background.ts",
|
||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"options_page": "options.html",
|
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["https://www.bilibili.com/video/*", "https://www.bilibili.com/list/*"],
|
"matches": ["https://*.bilibili.com/*"],
|
||||||
"js": ["src/inject/inject.ts"]
|
"js": ["src/inject/inject.ts"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -51,9 +50,7 @@ export default defineManifest(async (env) => ({
|
|||||||
},
|
},
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
{
|
{
|
||||||
"matches": [
|
"matches": ["https://*.bilibili.com/*"],
|
||||||
"https://www.bilibili.com/video/*", "https://www.bilibili.com/list/*"
|
|
||||||
],
|
|
||||||
"resources": [
|
"resources": [
|
||||||
"index.html",
|
"index.html",
|
||||||
],
|
],
|
||||||
|
@@ -58,7 +58,7 @@
|
|||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
||||||
"@typescript-eslint/parser": "^5.37.0",
|
"@typescript-eslint/parser": "^5.37.0",
|
||||||
"@vitejs/plugin-react": "^2.1.0",
|
"@vitejs/plugin-react": "^2.2.0",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"eslint": "8.22.0",
|
"eslint": "8.22.0",
|
||||||
"eslint-config-standard": "^17.0.0",
|
"eslint-config-standard": "^17.0.0",
|
||||||
@@ -72,6 +72,6 @@
|
|||||||
"rollup-plugin-visualizer": "^5.8.3",
|
"rollup-plugin-visualizer": "^5.8.3",
|
||||||
"tailwindcss": "^3.2.4",
|
"tailwindcss": "^3.2.4",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.8.3",
|
||||||
"vite": "^3.1.1"
|
"vite": "^3.2.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
675
pnpm-lock.yaml
generated
675
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -188,6 +188,7 @@ window.addEventListener("message", (event) => {
|
|||||||
info: data.info,
|
info: data.info,
|
||||||
data: res,
|
data: res,
|
||||||
}, type: 'setSubtitle'
|
}, type: 'setSubtitle'
|
||||||
|
// @ts-ignore
|
||||||
}, '*')
|
}, '*')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -199,6 +200,7 @@ window.addEventListener("message", (event) => {
|
|||||||
data: {
|
data: {
|
||||||
currentTime: video.currentTime
|
currentTime: video.currentTime
|
||||||
}, type: 'setCurrentTime'
|
}, type: 'setCurrentTime'
|
||||||
|
// @ts-ignore
|
||||||
}, '*')
|
}, '*')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,6 +213,7 @@ window.addEventListener("message", (event) => {
|
|||||||
noVideo: !videoElement,
|
noVideo: !videoElement,
|
||||||
totalHeight,
|
totalHeight,
|
||||||
}, type: 'setSettings'
|
}, type: 'setSettings'
|
||||||
|
// @ts-ignore
|
||||||
}, '*')
|
}, '*')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,10 +4,10 @@ import {visualizer} from "rollup-plugin-visualizer";
|
|||||||
import {crx} from '@crxjs/vite-plugin'
|
import {crx} from '@crxjs/vite-plugin'
|
||||||
import path from "path"
|
import path from "path"
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import manifest from './manifest.json'
|
import manifest from './manifest.config'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default ({mode}) => {
|
export default () => {
|
||||||
return defineConfig({
|
return defineConfig({
|
||||||
base: '/',
|
base: '/',
|
||||||
build: {
|
build: {
|
||||||
|
Reference in New Issue
Block a user