single-file-core 1.5.66 → 1.5.68

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/index.js CHANGED
@@ -896,6 +896,13 @@ class Processor {
896
896
  if (this.options.removeHiddenElements) {
897
897
  this.doc.querySelectorAll("input[type=hidden]").forEach(element => element.remove());
898
898
  }
899
+ if (this.options.removedElementsSelector) {
900
+ try {
901
+ this.doc.querySelectorAll(this.options.removedElementsSelector).forEach(element => element.remove());
902
+ } catch {
903
+ // ignored
904
+ }
905
+ }
899
906
  if (!this.options.saveFavicon) {
900
907
  this.doc.querySelectorAll("link[rel*=\"icon\"]").forEach(element => element.remove());
901
908
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.5.66",
3
+ "version": "1.5.68",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -348,7 +348,7 @@
348
348
  return origFontFace();
349
349
  }
350
350
  getDetailObject(family, source, ...args).then(detail => document.dispatchEvent(new CustomEvent(NEW_FONT_FACE_EVENT, { detail })));
351
- return new FontFace(family, source, ...args);
351
+ return new origFontFace(family, source, ...args);
352
352
  } catch (error) {
353
353
  error.stack = error.message + "\n" + " \n" + error.stack.trim().split("\n").slice(-1).join("\n");
354
354
  throw error;