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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.69",
3
+ "version": "1.0.70",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -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
  }
@@ -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() {
@@ -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) {