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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
package/modules/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
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;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -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 {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -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";
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.
package/vendor/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2010-2020 Gildas Lormeau
2
+ * Copyright 2010-2022 Gildas Lormeau
3
3
  * contact : gildas.lormeau <at> gmail.com
4
4
  *
5
5
  * This file is part of SingleFile.