Change frontend-initialize.js to content-script-main.js
This commit is contained in:
parent
a6344f635d
commit
6c93d1984f
@ -27,7 +27,7 @@ function injectSearchFrontend() {
|
|||||||
'/fg/js/popup.js',
|
'/fg/js/popup.js',
|
||||||
'/fg/js/popup-proxy-host.js',
|
'/fg/js/popup-proxy-host.js',
|
||||||
'/fg/js/frontend.js',
|
'/fg/js/frontend.js',
|
||||||
'/fg/js/frontend-initialize.js'
|
'/fg/js/content-script-main.js'
|
||||||
];
|
];
|
||||||
for (const src of scriptSrcs) {
|
for (const src of scriptSrcs) {
|
||||||
const node = document.querySelector(`script[src='${src}']`);
|
const node = document.querySelector(`script[src='${src}']`);
|
||||||
|
@ -61,7 +61,7 @@ async function createPopupProxy(depth, id, parentFrameId, url) {
|
|||||||
return popup;
|
return popup;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function contentScriptMain() {
|
||||||
await yomichan.prepare();
|
await yomichan.prepare();
|
||||||
|
|
||||||
const data = window.frontendInitializationData || {};
|
const data = window.frontendInitializationData || {};
|
||||||
@ -130,4 +130,4 @@ async function main() {
|
|||||||
await applyOptions();
|
await applyOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
contentScriptMain();
|
@ -26,7 +26,7 @@ function injectPopupNested() {
|
|||||||
'/fg/js/popup.js',
|
'/fg/js/popup.js',
|
||||||
'/fg/js/popup-proxy.js',
|
'/fg/js/popup-proxy.js',
|
||||||
'/fg/js/frontend.js',
|
'/fg/js/frontend.js',
|
||||||
'/fg/js/frontend-initialize.js'
|
'/fg/js/content-script-main.js'
|
||||||
];
|
];
|
||||||
for (const src of scriptSrcs) {
|
for (const src of scriptSrcs) {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
"fg/js/popup-proxy.js",
|
"fg/js/popup-proxy.js",
|
||||||
"fg/js/popup-proxy-host.js",
|
"fg/js/popup-proxy-host.js",
|
||||||
"fg/js/frontend.js",
|
"fg/js/frontend.js",
|
||||||
"fg/js/frontend-initialize.js"
|
"fg/js/content-script-main.js"
|
||||||
],
|
],
|
||||||
"match_about_blank": true,
|
"match_about_blank": true,
|
||||||
"all_frames": true
|
"all_frames": true
|
||||||
|
Loading…
Reference in New Issue
Block a user