|
|
@@ -21,7 +21,7 @@
|
|
|
* Source.
|
|
|
*/
|
|
|
|
|
|
-/* global globalThis */
|
|
|
+/* global globalThis, window */
|
|
|
|
|
|
const LOAD_DEFERRED_IMAGES_START_EVENT = "single-file-load-deferred-images-start";
|
|
|
const LOAD_DEFERRED_IMAGES_END_EVENT = "single-file-load-deferred-images-end";
|
|
|
@@ -46,7 +46,12 @@ const HTMLDocument = globalThis.HTMLDocument;
|
|
|
const FileReader = globalThis.FileReader;
|
|
|
const Blob = globalThis.Blob;
|
|
|
|
|
|
-const fontFaces = [];
|
|
|
+let fontFaces;
|
|
|
+if (window._singleFile_fontFaces) {
|
|
|
+ fontFaces = window._singleFile_fontFaces;
|
|
|
+} else {
|
|
|
+ fontFaces = window._singleFile_fontFaces = [];
|
|
|
+}
|
|
|
|
|
|
if (document instanceof HTMLDocument) {
|
|
|
if (browser && browser.runtime && browser.runtime.getURL) {
|