Gildas 2 лет назад
Родитель
Сommit
61faa98e92

+ 0 - 3
src/lib/single-file/core/content/content-hooks-frames-inline-injection.js

@@ -42,12 +42,10 @@ function injectedScript() {
 		window.globalThis = window;
 	}
 	const document = globalThis.document;
-	const console = globalThis.console;
 	const dispatchEvent = event => globalThis.dispatchEvent(event);
 	const CustomEvent = globalThis.CustomEvent;
 	const FileReader = globalThis.FileReader;
 	const Blob = globalThis.Blob;
-	const warn = (console && console.warn && ((...args) => console.warn(...args))) || (() => { });
 	const NEW_FONT_FACE_EVENT = "single-file-new-font-face";
 	const DELETE_FONT_EVENT = "single-file-delete-font";
 	const CLEAR_FONTS_EVENT = "single-file-clear-fonts";
@@ -66,7 +64,6 @@ function injectedScript() {
 		let warningFontFaceDisplayed;
 		globalThis.FontFace = function () {
 			if (!warningFontFaceDisplayed) {
-				warn("SingleFile is hooking the FontFace constructor, document.fonts.delete and document.fonts.clear to handle dynamically loaded fonts.");
 				warningFontFaceDisplayed = true;
 			}
 			getDetailObject(...arguments).then(detail => dispatchEvent(new CustomEvent(NEW_FONT_FACE_EVENT, { detail })));