single-file-core 1.0.69 → 1.0.70
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/package.json +1 -1
- package/single-file-core.js +4 -0
- package/single-file-helper.js +3 -1
- package/single-file-util.js +2 -1
package/package.json
CHANGED
package/single-file-core.js
CHANGED
|
@@ -499,6 +499,10 @@ class Processor {
|
|
|
499
499
|
if (legacyInfobarElement) {
|
|
500
500
|
legacyInfobarElement.remove();
|
|
501
501
|
}
|
|
502
|
+
const infobarElement = this.doc.querySelector(util.INFOBAR_TAGNAME);
|
|
503
|
+
if (infobarElement) {
|
|
504
|
+
infobarElement.remove();
|
|
505
|
+
}
|
|
502
506
|
if (this.options.includeInfobar) {
|
|
503
507
|
util.appendInfobar(this.doc, this.options);
|
|
504
508
|
}
|
package/single-file-helper.js
CHANGED
|
@@ -64,6 +64,7 @@ const FONT_WEIGHTS = {
|
|
|
64
64
|
const COMMENT_HEADER = "Page saved with SingleFile";
|
|
65
65
|
const COMMENT_HEADER_LEGACY = "Archive processed by SingleFile";
|
|
66
66
|
const SINGLE_FILE_UI_ELEMENT_CLASS = "single-file-ui-element";
|
|
67
|
+
const INFOBAR_TAGNAME = infobar.INFOBAR_TAGNAME;
|
|
67
68
|
const EMPTY_RESOURCE = "data:,";
|
|
68
69
|
const addEventListener = (type, listener, options) => globalThis.addEventListener(type, listener, options);
|
|
69
70
|
const dispatchEvent = event => { try { globalThis.dispatchEvent(event); } catch (error) { /* ignored */ } };
|
|
@@ -103,7 +104,8 @@ export {
|
|
|
103
104
|
COMMENT_HEADER,
|
|
104
105
|
COMMENT_HEADER_LEGACY,
|
|
105
106
|
SINGLE_FILE_UI_ELEMENT_CLASS,
|
|
106
|
-
EMPTY_RESOURCE
|
|
107
|
+
EMPTY_RESOURCE,
|
|
108
|
+
INFOBAR_TAGNAME
|
|
107
109
|
};
|
|
108
110
|
|
|
109
111
|
function initUserScriptHandler() {
|
package/single-file-util.js
CHANGED
|
@@ -183,7 +183,8 @@ function getInstance(utilOptions) {
|
|
|
183
183
|
COMMENT_HEADER: helper.COMMENT_HEADER,
|
|
184
184
|
COMMENT_HEADER_LEGACY: helper.COMMENT_HEADER_LEGACY,
|
|
185
185
|
SINGLE_FILE_UI_ELEMENT_CLASS: helper.SINGLE_FILE_UI_ELEMENT_CLASS,
|
|
186
|
-
EMPTY_RESOURCE: helper.EMPTY_RESOURCE
|
|
186
|
+
EMPTY_RESOURCE: helper.EMPTY_RESOURCE,
|
|
187
|
+
INFOBAR_TAGNAME: helper.INFOBAR_TAGNAME
|
|
187
188
|
};
|
|
188
189
|
|
|
189
190
|
async function getContent(resourceURL, options) {
|