Forráskód Böngészése

removed extension/index.js

Former-commit-id: 203e19e22b7a60eea6c568a21cadd7624ff6a4bb
Gildas 6 éve
szülő
commit
34ccd5f277

+ 1 - 1
extension/core/bg/autosave.js

@@ -118,7 +118,7 @@ singlefile.extension.core.bg.autosave = (() => {
 		options.incognito = tab.incognito;
 		options.tabId = tabId;
 		options.tabIndex = tab.index;
-		const pageData = await singlefile.extension.lib.getPageData(options, null, null);
+		const pageData = await singlefile.extension.getPageData(options, null, null);
 		if (options.includeInfobar) {
 			await singlefile.common.ui.content.infobar.includeScript(pageData);
 		}

+ 2 - 2
extension/core/bg/business.js

@@ -34,7 +34,7 @@ singlefile.extension.core.bg.business = (() => {
 	const extensionScriptFiles = [
 		"common/index.js",
 		"common/ui/content/content-infobar.js",
-		"extension/index.js",
+		"extension/lib/single-file/index.js",
 		"extension/core/index.js",
 		"extension/ui/index.js",
 		"extension/core/content/content-main.js",
@@ -73,7 +73,7 @@ singlefile.extension.core.bg.business = (() => {
 					const tabOptions = await config.getOptions(tab.url);
 					Object.keys(options).forEach(key => tabOptions[key] = options[key]);
 					tabOptions.extensionScriptFiles = extensionScriptFiles;
-					const scriptsInjected = await singlefile.extension.lib.injectScript(tabId, tabOptions);
+					const scriptsInjected = await singlefile.extension.injectScript(tabId, tabOptions);
 					let promiseSaveTab;
 					if (scriptsInjected) {
 						ui.onStart(tabId, EXECUTE_SCRIPTS_STEP);

+ 0 - 24
extension/index.js

@@ -1,24 +0,0 @@
-/*
- * Copyright 2010-2019 Gildas Lormeau
- * contact : gildas.lormeau <at> gmail.com
- * 
- * This file is part of SingleFile.
- *
- *   The code in this file is free software: you can redistribute it and/or 
- *   modify it under the terms of the GNU Affero General Public License 
- *   (GNU AGPL) as published by the Free Software Foundation, either version 3
- *   of the License, or (at your option) any later version.
- * 
- *   The code in this file is distributed in the hope that it will be useful, 
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of 
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero 
- *   General Public License for more details.
- *
- *   As additional permission under GNU AGPL version 3 section 7, you may 
- *   distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU 
- *   AGPL normally required by section 4, provided you include this license 
- *   notice and a URL through which recipients can access the Corresponding 
- *   Source.
- */
-
-this.singlefile.extension = this.singlefile.extension || {};

+ 0 - 2
extension/lib/single-file/core/bg/scripts.js

@@ -48,7 +48,6 @@ singlefile.extension.lib.core.bg.scripts = (() => {
 		"lib/single-file/single-file.js",
 		"lib/single-file/processors/lazy/content/content-lazy-loader.js",
 		"lib/single-file/processors/hooks/content/content-hooks.js",
-		"extension/index.js",
 		"extension/lib/single-file/index.js",
 		"extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js",
 		"extension/lib/single-file/fetch/content/content-fetch.js",
@@ -59,7 +58,6 @@ singlefile.extension.lib.core.bg.scripts = (() => {
 		"lib/single-file/single-file-helper.js",
 		"lib/single-file/processors/hooks/content/content-hooks-frames.js",
 		"lib/single-file/processors/frame-tree/content/content-frame-tree.js",
-		"extension/index.js",
 		"extension/lib/single-file/index.js",
 		"extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js",
 		"extension/lib/single-file/fetch/content/content-fetch.js"

+ 15 - 13
extension/lib/single-file/index.js

@@ -21,19 +21,21 @@
  *   Source.
  */
 
-this.singlefile.extension.lib = this.singlefile.extension.lib || {
-	core: {
-		bg: {}
-	},
-	fetch: {
-		bg: {},
-		content: {}
-	},
-	frameTree: {
-		bg: {}
-	},
-	lazy: {
-		bg: {}
+this.singlefile.extension = this.singlefile.extension || {
+	lib: {
+		core: {
+			bg: {}
+		},
+		fetch: {
+			bg: {},
+			content: {}
+		},
+		frameTree: {
+			bg: {}
+		},
+		lazy: {
+			bg: {}
+		}
 	},
 	injectScript: (tabId, options) => this.singlefile.extension.lib.core.bg.scripts.inject(tabId, options),
 	getPageData: (options, doc, win) => this.singlefile.lib.getPageData(options, { fetch: this.singlefile.extension.lib.fetch.content.resources.fetch }, doc, win)

+ 2 - 3
manifest.json

@@ -18,7 +18,6 @@
 			"run_at": "document_start",
 			"js": [
 				"lib/single-file/index.js",
-				"extension/index.js",
 				"extension/lib/single-file/index.js",
 				"extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js",
 				"lib/single-file/single-file-helper.js",
@@ -44,7 +43,7 @@
 			"js": [
 				"lib/single-file/index.js",
 				"lib/single-file/processors/hooks/content/content-hooks.js",
-				"extension/index.js",
+				"extension/lib/single-file/index.js",
 				"extension/core/index.js",
 				"extension/core/content/content-bootstrap.js"
 			]
@@ -53,7 +52,7 @@
 	"background": {
 		"scripts": [
 			"lib/single-file/index.js",
-			"extension/index.js",
+			"extension/lib/single-file/index.js",
 			"extension/core/index.js",
 			"extension/ui/index.js",
 			"extension/lib/single-file/index.js",