Просмотр исходного кода

removed /index.js

Former-commit-id: 17a0084d87382273cfa1607729f729ccbb400552
Gildas 6 лет назад
Родитель
Сommit
a6fdd1a39e

+ 2 - 2
build-extension.sh

@@ -2,7 +2,7 @@
 rm singlefile-extension-firefox.zip singlefile-extension-chromium.zip
 cp manifest.json manifest.copy.json
 jq "del(.options_page,.background.persistent)" manifest.copy.json > manifest.json
-zip -r singlefile-extension-firefox.zip manifest.json extension lib _locales index.js
+zip -r singlefile-extension-firefox.zip manifest.json extension lib _locales
 jq "del(.applications,.permissions[0],.options_ui.browser_style)" manifest.copy.json > manifest.json
-zip -r singlefile-extension-chromium.zip manifest.json extension lib _locales index.js
+zip -r singlefile-extension-chromium.zip manifest.json extension lib _locales
 mv manifest.copy.json manifest.json

+ 0 - 1
cli/back-ends/jsdom.js

@@ -32,7 +32,6 @@ const iconv = require("iconv-lite");
 const request = require("request-promise-native");
 
 const SCRIPTS = [
-	"../../index.js",
 	"../../lib/index.js",
 	"../../lib/hooks/content/content-hooks.js",
 	"../../lib/frame-tree/content/content-frame-tree.js",

+ 0 - 1
cli/back-ends/puppeteer.js

@@ -28,7 +28,6 @@ const fs = require("fs");
 const puppeteer = require("puppeteer-core");
 
 const SCRIPTS = [
-	"../../index.js",
 	"../../lib/index.js",
 	"../../lib/hooks/content/content-hooks.js",
 	"../../lib/hooks/content/content-hooks-frames.js",

+ 0 - 1
cli/back-ends/webdriver-chromium.js

@@ -30,7 +30,6 @@ const chrome = require("selenium-webdriver/chrome");
 const { Builder } = require("selenium-webdriver");
 
 const SCRIPTS = [
-	"../../index.js",
 	"../../lib/index.js",
 	"../../lib/hooks/content/content-hooks.js",
 	"../../lib/hooks/content/content-hooks-frames.js",

+ 0 - 1
cli/back-ends/webdriver-gecko.js

@@ -30,7 +30,6 @@ const firefox = require("selenium-webdriver/firefox");
 const { Builder, By, Key } = require("selenium-webdriver");
 
 const SCRIPTS = [
-	"../../index.js",
 	"../../lib/index.js",
 	"../../lib/hooks/content/content-hooks.js",
 	"../../lib/hooks/content/content-hooks-frames.js",

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

@@ -28,7 +28,6 @@ singlefile.extension.core.bg.business = (() => {
 	let contentScript, frameScript, modulesScript;
 
 	const contentScriptFiles = [
-		"/index.js",
 		"/lib/index.js",
 		"/lib/hooks/content/content-hooks.js",
 		"/lib/single-file/vendor/css-tree.js",
@@ -46,7 +45,6 @@ singlefile.extension.core.bg.business = (() => {
 	];
 
 	const frameScriptFiles = [
-		"/index.js",
 		"/lib/index.js",
 		"/lib/hooks/content/content-hooks-frames.js",
 		"/lib/single-file/single-file-helper.js",

+ 0 - 24
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 = this.singlefile || {};

+ 17 - 15
lib/index.js

@@ -21,19 +21,21 @@
  *   Source.
  */
 
-this.singlefile.lib = this.singlefile.lib || {
-	fetch: {
-		content: {}
-	},
-	frameTree: {
-		content: {}
-	},
-	hooks: {
-		content: {}
-	},
-	lazy: {
-		content: {}
-	},
-	vendor: {},
-	modules: {}
+this.singlefile = this.singlefile || {
+	lib: {
+		fetch: {
+			content: {}
+		},
+		frameTree: {
+			content: {}
+		},
+		hooks: {
+			content: {}
+		},
+		lazy: {
+			content: {}
+		},
+		vendor: {},
+		modules: {}
+	}
 };

+ 2 - 5
manifest.json

@@ -17,10 +17,9 @@
 			],
 			"run_at": "document_start",
 			"js": [
-				"index.js",
+				"lib/index.js",
 				"extension/index.js",
 				"extension/lib/browser-polyfill/chrome-browser-polyfill.js",
-				"lib/index.js",
 				"lib/hooks/content/content-hooks-frames.js",
 				"lib/single-file/single-file-helper.js",
 				"lib/frame-tree/content/content-frame-tree.js"
@@ -33,7 +32,7 @@
 				"<all_urls>"
 			],
 			"js": [
-				"index.js",
+				"lib/index.js",
 				"extension/index.js",
 				"extension/ui/content/content-ui-infobar.js"
 			]
@@ -44,7 +43,6 @@
 			],
 			"run_at": "document_start",
 			"js": [
-				"index.js",
 				"lib/index.js",
 				"lib/hooks/content/content-hooks.js",
 				"extension/index.js",
@@ -54,7 +52,6 @@
 	],
 	"background": {
 		"scripts": [
-			"index.js",
 			"lib/index.js",
 			"lib/single-file/vendor/css-minifier.js",
 			"lib/single-file/vendor/css-tree.js",