single-file-core 1.0.51 → 1.0.53

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.
@@ -143,7 +143,7 @@
143
143
  if (singleFileComment && isSingleFileComment(singleFileComment)) {
144
144
  const info = singleFileComment.textContent.split("\n");
145
145
  const [, , urlData, ...optionalData] = info;
146
- const urlMatch = urlData.match(/^ url: (.*) $/);
146
+ const urlMatch = urlData.match(/^ url: (.*) ?$/);
147
147
  const url = urlMatch && urlMatch[1];
148
148
  if (url) {
149
149
  let options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -226,6 +226,7 @@ function initResponse(message) {
226
226
  frameData.content = messageFrameData.content;
227
227
  frameData.baseURI = messageFrameData.baseURI;
228
228
  frameData.title = messageFrameData.title;
229
+ frameData.url = messageFrameData.url;
229
230
  frameData.canvases = messageFrameData.canvases;
230
231
  frameData.fonts = messageFrameData.fonts;
231
232
  frameData.stylesheets = messageFrameData.stylesheets;
@@ -392,6 +393,7 @@ function getFrameData(document, globalThis, windowId, options) {
392
393
  windowId,
393
394
  content,
394
395
  baseURI,
396
+ url: document.location.href,
395
397
  title: document.title,
396
398
  canvases: docData.canvases,
397
399
  fonts: docData.fonts,
@@ -317,6 +317,7 @@
317
317
  return new FontFace(...arguments);
318
318
  };
319
319
  globalThis.FontFace.prototype = FontFace.prototype;
320
+ globalThis.FontFace.toString = function () { return "function FontFace() { [native code] }"; };
320
321
  const deleteFont = document.fonts.delete;
321
322
  document.fonts.delete = function (fontFace) {
322
323
  getDetailObject(fontFace.family).then(detail => dispatchEvent(new CustomEvent(DELETE_FONT_EVENT, { detail })));