single-file-core 1.0.55 → 1.0.57

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.
@@ -136,6 +136,11 @@
136
136
  displayIcon();
137
137
  }
138
138
  }
139
+ if (globalThis.singlefile) {
140
+ globalThis.singlefile.infobar = {
141
+ displayIcon
142
+ };
143
+ }
139
144
 
140
145
  async function displayIcon() {
141
146
  const result = document.evaluate("//comment()", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
package/single-file.js CHANGED
@@ -55,13 +55,6 @@ async function getPageData(options = {}, initOptions, doc = globalThis.document,
55
55
  helper.initDoc(doc);
56
56
  const preInitializationPromises = [];
57
57
  if (!options.saveRawPage) {
58
- if (options.loadDeferredImages) {
59
- if (options.loadDeferredImagesBeforeFrames) {
60
- await processors.lazy.process(options);
61
- } else {
62
- preInitializationPromises.push(processors.lazy.process(options));
63
- }
64
- }
65
58
  if (!options.removeFrames && frames && globalThis.frames) {
66
59
  let frameTreePromise;
67
60
  if (options.loadDeferredImages) {
@@ -75,9 +68,16 @@ async function getPageData(options = {}, initOptions, doc = globalThis.document,
75
68
  preInitializationPromises.push(frameTreePromise);
76
69
  }
77
70
  }
71
+ if (options.loadDeferredImages) {
72
+ if (options.loadDeferredImagesBeforeFrames) {
73
+ await processors.lazy.process(options);
74
+ } else {
75
+ preInitializationPromises.push(processors.lazy.process(options));
76
+ }
77
+ }
78
78
  }
79
79
  if (!options.loadDeferredImagesBeforeFrames) {
80
- [,options.frames] = await Promise.all(preInitializationPromises);
80
+ [options.frames] = await Promise.all(preInitializationPromises);
81
81
  }
82
82
  framesSessionId = options.frames && options.frames.sessionId;
83
83
  }