single-file-core 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/modules/css-fonts-alt-minifier.js +1 -1
- package/modules/css-fonts-minifier.js +1 -1
- package/modules/css-matched-rules.js +1 -1
- package/modules/css-medias-alt-minifier.js +1 -1
- package/modules/css-rules-minifier.js +1 -1
- package/modules/html-images-alt-minifier.js +1 -1
- package/modules/html-minifier.js +1 -1
- package/modules/html-serializer.js +1 -1
- package/modules/index.js +1 -1
- package/package.json +1 -1
- package/processors/frame-tree/content/content-frame-tree.js +1 -1
- package/processors/hooks/content/content-hooks-frames-web.js +1 -1
- package/processors/hooks/content/content-hooks-frames.js +18 -18
- package/processors/hooks/content/content-hooks-web.js +1 -1
- package/processors/hooks/content/content-hooks.js +1 -1
- package/processors/index.js +1 -1
- package/processors/lazy/content/content-lazy-loader.js +1 -1
- package/single-file-bootstrap.js +23 -0
- package/single-file-core.js +1 -1
- package/single-file-frames.js +23 -0
- package/single-file-helper.js +1 -1
- package/single-file-util.js +1 -1
- package/vendor/index.js +1 -1
package/index.js
CHANGED
package/modules/html-minifier.js
CHANGED
package/modules/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2010-
|
|
2
|
+
* Copyright 2010-2022 Gildas Lormeau
|
|
3
3
|
* contact : gildas.lormeau <at> gmail.com
|
|
4
4
|
*
|
|
5
5
|
* This file is part of SingleFile.
|
|
@@ -56,24 +56,24 @@ if (window._singleFile_fontFaces) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
if (document instanceof Document) {
|
|
59
|
+
addEventListener(NEW_FONT_FACE_EVENT, event => {
|
|
60
|
+
const detail = event.detail;
|
|
61
|
+
const key = Object.assign({}, detail);
|
|
62
|
+
delete key.src;
|
|
63
|
+
fontFaces.set(JSON.stringify(key), detail);
|
|
64
|
+
});
|
|
65
|
+
addEventListener(DELETE_FONT_EVENT, event => {
|
|
66
|
+
const detail = event.detail;
|
|
67
|
+
const key = Object.assign({}, detail);
|
|
68
|
+
delete key.src;
|
|
69
|
+
fontFaces.delete(JSON.stringify(key));
|
|
70
|
+
});
|
|
71
|
+
addEventListener(CLEAR_FONTS_EVENT, () => fontFaces = new Map());
|
|
72
|
+
let scriptElement = document.createElement("script");
|
|
73
|
+
scriptElement.src = "data:," + "(" + injectedScript.toString() + ")()";
|
|
74
|
+
(document.documentElement || document).appendChild(scriptElement);
|
|
75
|
+
scriptElement.remove();
|
|
59
76
|
if (browser && browser.runtime && browser.runtime.getURL) {
|
|
60
|
-
addEventListener(NEW_FONT_FACE_EVENT, event => {
|
|
61
|
-
const detail = event.detail;
|
|
62
|
-
const key = Object.assign({}, detail);
|
|
63
|
-
delete key.src;
|
|
64
|
-
fontFaces.set(JSON.stringify(key), detail);
|
|
65
|
-
});
|
|
66
|
-
addEventListener(DELETE_FONT_EVENT, event => {
|
|
67
|
-
const detail = event.detail;
|
|
68
|
-
const key = Object.assign({}, detail);
|
|
69
|
-
delete key.src;
|
|
70
|
-
fontFaces.delete(JSON.stringify(key));
|
|
71
|
-
});
|
|
72
|
-
addEventListener(CLEAR_FONTS_EVENT, () => fontFaces = new Map());
|
|
73
|
-
let scriptElement = document.createElement("script");
|
|
74
|
-
scriptElement.src = "data:," + "(" + injectedScript.toString() + ")()";
|
|
75
|
-
(document.documentElement || document).appendChild(scriptElement);
|
|
76
|
-
scriptElement.remove();
|
|
77
77
|
scriptElement = document.createElement("script");
|
|
78
78
|
scriptElement.src = browser.runtime.getURL("/lib/web/hooks/hooks-frames-web.js");
|
|
79
79
|
scriptElement.async = false;
|
package/processors/index.js
CHANGED
package/single-file-bootstrap.js
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2010-2022 Gildas Lormeau
|
|
3
|
+
* contact : gildas.lormeau <at> gmail.com
|
|
4
|
+
*
|
|
5
|
+
* This file is part of SingleFile.
|
|
6
|
+
*
|
|
7
|
+
* The code in this file is free software: you can redistribute it and/or
|
|
8
|
+
* modify it under the terms of the GNU Affero General Public License
|
|
9
|
+
* (GNU AGPL) as published by the Free Software Foundation, either version 3
|
|
10
|
+
* of the License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* The code in this file is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
|
|
15
|
+
* General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* As additional permission under GNU AGPL version 3 section 7, you may
|
|
18
|
+
* distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
|
|
19
|
+
* AGPL normally required by section 4, provided you include this license
|
|
20
|
+
* notice and a URL through which recipients can access the Corresponding
|
|
21
|
+
* Source.
|
|
22
|
+
*/
|
|
23
|
+
|
|
1
24
|
import * as frameTree from "./processors/frame-tree/content/content-frame-tree.js";
|
|
2
25
|
import * as serializer from "./modules/html-serializer.js";
|
|
3
26
|
import {
|
package/single-file-core.js
CHANGED
package/single-file-frames.js
CHANGED
|
@@ -1 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2010-2022 Gildas Lormeau
|
|
3
|
+
* contact : gildas.lormeau <at> gmail.com
|
|
4
|
+
*
|
|
5
|
+
* This file is part of SingleFile.
|
|
6
|
+
*
|
|
7
|
+
* The code in this file is free software: you can redistribute it and/or
|
|
8
|
+
* modify it under the terms of the GNU Affero General Public License
|
|
9
|
+
* (GNU AGPL) as published by the Free Software Foundation, either version 3
|
|
10
|
+
* of the License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* The code in this file is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
|
|
15
|
+
* General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* As additional permission under GNU AGPL version 3 section 7, you may
|
|
18
|
+
* distribute UNMODIFIED VERSIONS OF THIS file without the copy of the GNU
|
|
19
|
+
* AGPL normally required by section 4, provided you include this license
|
|
20
|
+
* notice and a URL through which recipients can access the Corresponding
|
|
21
|
+
* Source.
|
|
22
|
+
*/
|
|
23
|
+
|
|
1
24
|
import "./processors/frame-tree/content/content-frame-tree.js";
|
package/single-file-helper.js
CHANGED
package/single-file-util.js
CHANGED
package/vendor/index.js
CHANGED