|
|
@@ -24,14 +24,14 @@ singlefile.core = (() => {
|
|
|
|
|
|
const TIMEOUT_PROCESS_START_MESSAGE = 3000;
|
|
|
|
|
|
- const initScriptFiles = [
|
|
|
+ const frameScriptFiles = [
|
|
|
"/lib/browser-polyfill/custom-browser-polyfill.js",
|
|
|
"/extension/index.js",
|
|
|
"/lib/frame-tree/content/frame-tree.js",
|
|
|
"/extension/core/content/content-frame.js"
|
|
|
];
|
|
|
|
|
|
- const processScriptFiles = [
|
|
|
+ const topScriptFiles = [
|
|
|
"/lib/browser-polyfill/custom-browser-polyfill.js",
|
|
|
"/extension/index.js",
|
|
|
"/extension/ui/content/ui.js",
|
|
|
@@ -67,10 +67,10 @@ singlefile.core = (() => {
|
|
|
|
|
|
async function processStart(tab, options) {
|
|
|
if (!options.removeFrames) {
|
|
|
- await executeScripts(tab.id, initScriptFiles, { allFrames: true, matchAboutBlank: true });
|
|
|
+ await executeScripts(tab.id, frameScriptFiles, { allFrames: true, matchAboutBlank: true });
|
|
|
await FrameTree.initialize(tab.id);
|
|
|
}
|
|
|
- await executeScripts(tab.id, processScriptFiles, { allFrames: false });
|
|
|
+ await executeScripts(tab.id, topScriptFiles, { allFrames: false });
|
|
|
if (options.frameId) {
|
|
|
await browser.tabs.sendMessage(tab.id, { processStart: true, options }, { frameId: options.frameId });
|
|
|
} else {
|