single-file-core 1.3.24 → 1.3.25

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/core/infobar.js CHANGED
@@ -205,6 +205,7 @@ function appendInfobar(doc, options, useShadowRoot) {
205
205
  } else {
206
206
  const scriptElement = doc.createElement("script");
207
207
  let scriptContent = refreshInfobarInfo.toString();
208
+ scriptContent += ";const SINGLE_FILE_SIGNATURE = " + JSON.stringify(SINGLE_FILE_SIGNATURE) + ";";
208
209
  scriptContent += extractInfobarData.toString();
209
210
  scriptContent += "(" + initInfobar.toString() + ")(document)";
210
211
  scriptElement.textContent = scriptContent;
@@ -349,7 +349,7 @@ function getUsedFontWeight(fontInfo, fontStyle, fontWeights) {
349
349
  }
350
350
  }
351
351
  if (!foundWeight) {
352
- foundWeight = fontWeights.find(weights => weights[0] <= fontWeight && weights[1] >= fontWeight);
352
+ foundWeight = fontWeights.find(weights => weights[0] <= fontWeight && weights[weights.length - 1] >= fontWeight);
353
353
  }
354
354
  } else {
355
355
  foundWeight = fontWeights[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.3.24",
3
+ "version": "1.3.25",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",