Sfoglia il codice sorgente

Merge pull request #16 from gildas-lormeau/master

upd
solokot 5 anni fa
parent
commit
7e72aeaab7

+ 4 - 0
_locales/de/messages.json

@@ -643,6 +643,10 @@
 		"message": "Speichern der Webseite",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Drucken der Webseite",
+		"description": "Title of the button 'Print the page' in the editor"
+	},	
 	"pendingsTitle": {
 		"message": "Pending saves",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 4 - 0
_locales/en/messages.json

@@ -643,6 +643,10 @@
 		"message": "Save the page",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "Pending saves",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 4 - 0
_locales/es/messages.json

@@ -643,6 +643,10 @@
 		"message": "Save the page",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "Pending saves",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 4 - 0
_locales/fr/messages.json

@@ -643,6 +643,10 @@
 		"message": "Sauver la page",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Imprimer la page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "Sauvegardes en cours",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 4 - 0
_locales/ja/messages.json

@@ -643,6 +643,10 @@
 		"message": "ページを保存する",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "保留中の保存",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 4 - 0
_locales/pl/messages.json

@@ -643,6 +643,10 @@
 		"message": "Zapisz stronę",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Wydrukuj stronę",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "Oczekujące zapisy",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 15 - 11
_locales/ru/messages.json

@@ -3,14 +3,14 @@
 		"message": "Сохранение полной страницы в едином HTML-файле",
 		"description": "Description of the extension."
 	},
-    "commandSaveTab": {
-        "message": "Сохранить текущую вкладку или выделенное",
-        "description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
-    },
-    "commandSaveAllTabs": {
-        "message": "Сохранить все вкладки",
-        "description": "Command (Ctrl+Shift+U): 'Save all tabs'"
-    },
+	"commandSaveTab": {
+		"message": "Сохранить текущую вкладку или выделенное",
+		"description": "Command (Ctrl+Shift+Y): 'Save the current tab or the selected content'"
+	},
+	"commandSaveAllTabs": {
+		"message": "Сохранить все вкладки",
+		"description": "Command (Ctrl+Shift+U): 'Save all tabs'"
+	},
 	"menuSavePage": {
 		"message": "Сохранить страницу с помощью SingleFile",
 		"description": "Menu entry: 'Save page with SingleFile'"
@@ -382,7 +382,7 @@
 	"optionAutoSaveExternalSave": {
 		"message": "сохранять страницу с помощью SingleFile Companion",
 		"description": "Options page label: 'save the page with SingleFile Companion'"
-	},	
+	},
 	"optionsEditorSubTitle": {
 		"message": "Редактор аннотаций",
 		"description": "Options sub-title: 'Annotation editor'"
@@ -416,7 +416,7 @@
 		"description": "Options page label: 'default mode > remove elements'"
 	},
 	"optionDefaultEditorModeCutExternal": {
-		"message": "удалить внешние элементы,
+		"message": "удалить внешние элементы",
 		"description": "Options page label: 'default mode > remove external elements'"
 	},
 	"optionApplySystemTheme": {
@@ -643,6 +643,10 @@
 		"message": "Сохранить страницу",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "Отложенное сохранение",
 		"description": "Title of the pending save page 'Pending saves' in the editor"
@@ -695,4 +699,4 @@
 		"message": "Отмена",
 		"description": "Add URLs popup cancel button: 'Cancel'"
 	}
-}
+}

+ 4 - 0
_locales/uk/messages.json

@@ -643,6 +643,10 @@
 		"message": "Зберегти сторінку",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "Pending saves",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 6 - 2
_locales/zh_CN/messages.json

@@ -412,11 +412,11 @@
 		"description": "Options page label: 'default mode > format the page'"
 	},
 	"optionDefaultEditorModeCut": {
-		"message": "删除文档元素",
+		"message": "删除内部文档元素",
 		"description": "Options page label: 'default mode > remove elements'"
 	},
 	"optionDefaultEditorModeCutExternal": {
-		"message": "remove external elements",
+		"message": "删除外部文档元素",
 		"description": "Options page label: 'default mode > remove external elements'"
 	},
 	"optionApplySystemTheme": {
@@ -643,6 +643,10 @@
 		"message": "保存该页面",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "挂起保存项",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 6 - 2
_locales/zh_TW/messages.json

@@ -412,11 +412,11 @@
 		"description": "Options page label: 'default mode > format the page'"
 	},
 	"optionDefaultEditorModeCut": {
-		"message": "刪除文檔元素",
+		"message": "刪除內部文檔元素",
 		"description": "Options page label: 'default mode > remove elements'"
 	},
 	"optionDefaultEditorModeCutExternal": {
-		"message": "remove external elements",
+		"message": "刪除外部文檔元素",
 		"description": "Options page label: 'default mode > remove external elements'"
 	},
 	"optionApplySystemTheme": {
@@ -643,6 +643,10 @@
 		"message": "保存該頁面",
 		"description": "Title of the button 'Save the page' in the editor"
 	},
+	"editorPrintPage": {
+		"message": "Print the page",
+		"description": "Title of the button 'Print the page' in the editor"
+	},
 	"pendingsTitle": {
 		"message": "掛起保存項",
 		"description": "Title of the pending save page 'Pending saves' in the editor"

+ 2 - 1
extension/core/bg/config.js

@@ -95,7 +95,8 @@ singlefile.extension.core.bg.config = (() => {
 		saveFavicon: true,
 		includeBOM: false,
 		warnUnsavedPage: true,
-		autoSaveExternalSave: false
+		autoSaveExternalSave: false,
+		insertMetaNoIndex: false
 	};
 
 	let configStorage;

+ 1 - 1
extension/lib/single-file/fetch/content/content-fetch.js

@@ -69,7 +69,7 @@ this.singlefile.extension.lib.fetch.content.resources = this.singlefile.extensio
 				const response = await sendMessage({ method: "singlefile.fetch", url });
 				return {
 					status: response.status,
-					headers: { get: headerName => response.headers[headerName] },
+					headers: { get: headerName => response.headers && response.headers[headerName] },
 					arrayBuffer: async () => new Uint8Array(response.array).buffer
 				};
 			}

+ 1 - 1
extension/lib/woleet/woleet.js

@@ -26,7 +26,7 @@
 this.woleet = this.woleet || (() => {
 
 	const urlService = "https://api.woleet.io/v1/anchor";
-	const apiKey = "__WOLEET_API_KEY__";
+	const apiKey = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhYzZmZTMzMi0wODNjLTRjZmMtYmYxNC0xNWU5MTJmMWY4OWIiLCJpYXQiOjE1NzYxNzQzNDV9.n31j9ctJj7R1Vjwyc5yd1d6Cmg0NDnpwSaLWsqtZJQA";
 
 	return {
 		anchor

+ 6 - 1
extension/ui/bg/ui-editor.js

@@ -47,6 +47,7 @@ singlefile.extension.ui.bg.editor = (() => {
 	const undoAllCutPageButton = document.querySelector(".undo-all-cut-page-button");
 	const redoCutPageButton = document.querySelector(".redo-cut-page-button");
 	const savePageButton = document.querySelector(".save-page-button");
+	const printPageButton = document.querySelector(".print-page-button");
 
 	let tabData, tabDataContents = [];
 
@@ -69,12 +70,12 @@ singlefile.extension.ui.bg.editor = (() => {
 	undoAllCutPageButton.title = browser.i18n.getMessage("editorUndoAllCutPage");
 	redoCutPageButton.title = browser.i18n.getMessage("editorRedoCutPage");
 	savePageButton.title = browser.i18n.getMessage("editorSavePage");
+	printPageButton.title = browser.i18n.getMessage("editorPrintPage");
 
 	addYellowNoteButton.onclick = () => editorElement.contentWindow.postMessage(JSON.stringify({ method: "addNote", color: "note-yellow" }), "*");
 	addPinkNoteButton.onclick = () => editorElement.contentWindow.postMessage(JSON.stringify({ method: "addNote", color: "note-pink" }), "*");
 	addBlueNoteButton.onclick = () => editorElement.contentWindow.postMessage(JSON.stringify({ method: "addNote", color: "note-blue" }), "*");
 	addGreenNoteButton.onclick = () => editorElement.contentWindow.postMessage(JSON.stringify({ method: "addNote", color: "note-green" }), "*");
-	editorElement.contentWindow.focus();
 	document.onclick = () => editorElement.contentWindow.focus();
 	highlightButtons.forEach(highlightButton => {
 		highlightButton.onclick = () => {
@@ -191,6 +192,9 @@ singlefile.extension.ui.bg.editor = (() => {
 	savePageButton.onclick = () => {
 		savePage();
 	};
+	printPageButton.onclick = () => {
+		editorElement.contentWindow.postMessage(JSON.stringify({ method: "printPage" }), "*");
+	};
 	let updatedResources = {};
 
 	window.onmessage = event => {
@@ -264,6 +268,7 @@ singlefile.extension.ui.bg.editor = (() => {
 					tabData.docSaved = true;
 					tabDataContents = [];
 					editorElement.contentWindow.postMessage(JSON.stringify({ method: "init", content: tabData.content }), "*");
+					editorElement.contentWindow.focus();
 					delete tabData.content;
 				}
 				return Promise.resolve({});

+ 13 - 0
extension/ui/content/content-ui-editor-web.js

@@ -909,6 +909,9 @@ table {
 			onUpdate(true);
 			window.parent.postMessage(JSON.stringify({ "method": "setContent", content: getContent(message.compressHTML, message.updatedResources) }), "*");
 		}
+		if (message.method == "printPage") {
+			printPage();
+		}
 	};
 	window.onresize = reflowNotes;
 
@@ -1316,6 +1319,16 @@ table {
 			window.parent.postMessage(JSON.stringify({ "method": "savePage" }), "*");
 			event.preventDefault();
 		}
+		if (event.key.toLowerCase() == "p" && event.ctrlKey) {
+			printPage();
+			event.preventDefault();
+		}
+	}
+
+	function printPage() {
+		unhighlightCutElement();
+		resetSelectedElements();
+		window.print();
 	}
 
 	function highlightCutElement() {

+ 3 - 2
extension/ui/pages/editor.html

@@ -49,12 +49,13 @@
 			<div class="separator"></div>
 		</div>
 		<div class="buttons">
-			<img type="button" class="save-page-button" src="/extension/ui/resources/button_download.png">
+			<img type="button" class="print-page-button" src="/extension/ui/resources/button_print.png">
+			<img type="button" class="save-page-button" src="/extension/ui/resources/button_download.png">			
 		</div>
 	</div>
 	<iframe class="editor"
 		srcdoc="&lt;!DOCTYPE html&gt; &lt;body&gt;&lt;script src=/extension/ui/content/content-ui-editor-web.js&gt;&lt;/script&gt;&lt;script src=/lib/single-file/index.js&gt;&lt;/script&gt;&lt;script src=/lib/single-file/modules/html-serializer.js&gt;&lt;/script&gt;&lt;script src=/extension/lib/readability/Readability.js&gt;&lt;/script&gt;&lt;/script&gt;&lt;script src=/extension/lib/readability/Readability-readerable.js&gt;&lt;/script&gt;&lt;/body&gt;"
-		sandbox="allow-scripts"></iframe>
+		sandbox="allow-scripts allow-modals"></iframe>
 	<script type="text/javascript"
 		src="/extension/lib/single-file/browser-polyfill/chrome-browser-polyfill.js"></script>
 	<script src="/lib/single-file/index.js"></script>

+ 2 - 0
extension/ui/pages/help.html

@@ -518,6 +518,8 @@
 							class="icon button"> (undo all)
 					<li>redo removes by clicking the button <img src="../resources/button_redo_cut.png"
 							class="icon button"></li>
+					<li>print the page by clicking the button <img src="../resources/button_print.png"
+							class="icon button"> or by pressing <code>Ctrl-P</code></li>
 					<li>save the page by clicking the button <img src="../resources/button_download.png"
 							class="icon button"> or by pressing <code>Ctrl-S</code></li>
 				</ul>

BIN
extension/ui/resources/button_print.png


+ 37 - 32
lib/single-file/modules/css-fonts-alt-minifier.js

@@ -58,7 +58,7 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 	const FONT_MAX_LOAD_DELAY = 5000;
 
 	return {
-		process: async (doc, stylesheets, fontURLs) => {
+		process: async (doc, stylesheets, fontURLs, fontTests) => {
 			const fontsDetails = {
 				fonts: new Map(),
 				medias: new Map(),
@@ -87,9 +87,9 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 				const media = stylesheetInfo.mediaText;
 				if (cssRules) {
 					if (media && media != MEDIA_ALL) {
-						await processFontFaceRules(cssRules, sheetIndex, fontsDetails.medias.get("media-" + sheetIndex + "-" + media), fontURLs, stats);
+						await processFontFaceRules(cssRules, sheetIndex, fontsDetails.medias.get("media-" + sheetIndex + "-" + media), fontURLs, fontTests, stats);
 					} else {
-						await processFontFaceRules(cssRules, sheetIndex, fontsDetails, fontURLs, stats);
+						await processFontFaceRules(cssRules, sheetIndex, fontsDetails, fontURLs, fontTests, stats);
 					}
 					stats.rules.discarded -= cssRules.getSize();
 				}
@@ -168,7 +168,7 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 		fontsDetails.supports.forEach(supportsFontsDetails => processFontDetails(supportsFontsDetails));
 	}
 
-	async function processFontFaceRules(cssRules, sheetIndex, fontsDetails, fontURLs, stats) {
+	async function processFontFaceRules(cssRules, sheetIndex, fontsDetails, fontURLs, fontTests, stats) {
 		const cssTree = singlefile.lib.vendor.cssTree;
 		const removedRules = [];
 		let mediaIndex = 0, supportsIndex = 0;
@@ -176,17 +176,17 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 			const ruleData = cssRule.data;
 			if (ruleData.type == "Atrule" && ruleData.name == "media" && ruleData.block && ruleData.block.children && ruleData.prelude) {
 				const mediaText = cssTree.generate(ruleData.prelude);
-				await processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.medias.get("media-" + sheetIndex + "-" + mediaIndex + "-" + mediaText), fontURLs, stats);
+				await processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.medias.get("media-" + sheetIndex + "-" + mediaIndex + "-" + mediaText), fontURLs, fontTests, stats);
 				mediaIndex++;
 			} else if (ruleData.type == "Atrule" && ruleData.name == "supports" && ruleData.block && ruleData.block.children && ruleData.prelude) {
 				const supportsText = cssTree.generate(ruleData.prelude);
-				await processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.supports.get("supports-" + sheetIndex + "-" + supportsIndex + "-" + supportsText), fontURLs, stats);
+				await processFontFaceRules(ruleData.block.children, sheetIndex, fontsDetails.supports.get("supports-" + sheetIndex + "-" + supportsIndex + "-" + supportsText), fontURLs, fontTests, stats);
 				supportsIndex++;
 			} else if (ruleData.type == "Atrule" && ruleData.name == "font-face") {
 				const key = getFontKey(ruleData);
 				const fontInfo = fontsDetails.fonts.get(key);
 				if (fontInfo) {
-					const processed = await processFontFaceRule(ruleData, fontInfo, fontURLs, stats);
+					const processed = await processFontFaceRule(ruleData, fontInfo, fontURLs, fontTests, stats);
 					if (processed) {
 						fontsDetails.fonts.delete(key);
 					}
@@ -198,7 +198,7 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 		removedRules.forEach(cssRule => cssRules.remove(cssRule));
 	}
 
-	async function processFontFaceRule(ruleData, fontInfo, fontURLs, stats) {
+	async function processFontFaceRule(ruleData, fontInfo, fontURLs, fontTests, stats) {
 		const cssTree = singlefile.lib.vendor.cssTree;
 
 		const removedNodes = [];
@@ -212,34 +212,39 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 		const srcDeclaration = ruleData.block.children.filter(node => node.property == "src").tail;
 		if (srcDeclaration) {
 			await Promise.all(fontInfo.map(async (source, sourceIndex) => {
-				if (FontFace) {
-					const fontFace = new FontFace("test-font", source.src);
-					try {
-						await fontFace.load();
-						await fontFace.loaded;
-						source.valid = true;
-					} catch (error) {
-						const declarationFontURLs = fontURLs.get(srcDeclaration.data);
-						if (declarationFontURLs) {
-							const fontURL = declarationFontURLs[declarationFontURLs.length - sourceIndex - 1];
-							if (fontURL) {
-								const fontFace = new FontFace("test-font", "url(" + fontURL + ")");
-								try {
-									await Promise.race(
-										[
-											fontFace.load().then(() => fontFace.loaded).then(() => source.valid = true),
-											new Promise(resolve => setTimeout.call(window, () => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY))
-										]);
-								} catch (error) {
-									// ignored
+				if (fontTests.has(source.src)) {
+					source.valid = fontTests.get(source.src);
+				} else {
+					if (FontFace) {
+						const fontFace = new FontFace("test-font", source.src);
+						try {
+							await fontFace.load();
+							await fontFace.loaded;
+							source.valid = true;
+						} catch (error) {
+							const declarationFontURLs = fontURLs.get(srcDeclaration.data);
+							if (declarationFontURLs) {
+								const fontURL = declarationFontURLs[declarationFontURLs.length - sourceIndex - 1];
+								if (fontURL) {
+									const fontFace = new FontFace("test-font", "url(" + fontURL + ")");
+									try {
+										await Promise.race(
+											[
+												fontFace.load().then(() => fontFace.loaded).then(() => source.valid = true),
+												new Promise(resolve => setTimeout.call(window, () => { source.valid = true; resolve(); }, FONT_MAX_LOAD_DELAY))
+											]);
+									} catch (error) {
+										// ignored
+									}
 								}
+							} else {
+								source.valid = true;
 							}
-						} else {
-							source.valid = true;
 						}
+					} else {
+						source.valid = true;
 					}
-				} else {
-					source.valid = true;
+					fontTests.set(source.src, source.valid);
 				}
 			}));
 			const findSource = (fontFormat, testValidity) => fontInfo.find(source => !source.src.match(EMPTY_URL_SOURCE) && source.format == fontFormat && (!testValidity || source.valid));

+ 14 - 1
lib/single-file/single-file-core.js

@@ -161,6 +161,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 			this.options.baseURI = rootDocDefined && this.options.doc.baseURI;
 			this.options.rootDocument = root;
 			this.options.updatedResources = this.options.updatedResources || {};
+			this.options.fontTests = new Map();
 			this.batchRequest = new BatchRequest();
 			this.processor = new Processor(options, this.batchRequest);
 			if (rootDocDefined) {
@@ -404,6 +405,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 			this.stylesheets = new Map();
 			this.styles = new Map();
 			this.cssVariables = new Map();
+			this.fontTests = options.fontTests;
 		}
 
 		initialize() {
@@ -479,6 +481,15 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 					canonicalLink.href = this.options.saveUrl;
 				}
 			}
+			if (this.options.insertMetaNoIndex) {
+				let metaElement = this.doc.querySelector("meta[name=robots][content*=noindex]");
+				if (!metaElement) {
+					metaElement = this.doc.createElement("meta");
+					metaElement.setAttribute("name", "robots");
+					metaElement.setAttribute("content", "noindex");
+					this.doc.head.appendChild(metaElement);
+				}
+			}
 			let size;
 			if (this.options.displayStats) {
 				size = util.getContentSize(this.doc.documentElement.outerHTML);
@@ -986,6 +997,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 			async function initializeProcessor(frameData, frameElement, frameWindowId, batchRequest, options) {
 				options.insertSingleFileComment = false;
 				options.insertCanonicalLink = false;
+				options.insertMetaNoIndex = false;
 				options.saveFavicon = false;
 				options.url = frameData.baseURI;
 				options.windowId = frameWindowId;
@@ -1072,6 +1084,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 				const options = Object.create(this.options);
 				options.insertSingleFileComment = false;
 				options.insertCanonicalLink = false;
+				options.insertMetaNoIndex = false;
 				options.saveFavicon = false;
 				options.removeUnusedStyles = false;
 				options.removeAlternativeMedias = false;
@@ -1213,7 +1226,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 		}
 
 		async removeAlternativeFonts() {
-			await util.removeAlternativeFonts(this.doc, this.stylesheets, this.options.fontURLs);
+			await util.removeAlternativeFonts(this.doc, this.stylesheets, this.options.fontURLs, this.options.fontTests);
 		}
 
 		async processFrames() {

+ 2 - 2
lib/single-file/single-file-util.js

@@ -153,8 +153,8 @@ this.singlefile.lib.util = this.singlefile.lib.util || (() => {
 				removeUnusedFonts(doc, stylesheets, styles, options) {
 					return modules.fontsMinifier.process(doc, stylesheets, styles, options);
 				},
-				removeAlternativeFonts(doc, stylesheets, fontURLs) {
-					return modules.fontsAltMinifier.process(doc, stylesheets, fontURLs);
+				removeAlternativeFonts(doc, stylesheets, fontURLs, fontTests) {
+					return modules.fontsAltMinifier.process(doc, stylesheets, fontURLs, fontTests);
 				},
 				getMediaAllInfo(doc, stylesheets, styles) {
 					return modules.matchedRules.getMediaAllInfo(doc, stylesheets, styles);

+ 1 - 1
manifest.json

@@ -8,7 +8,7 @@
 		"64": "extension/ui/resources/icon_64.png",
 		"128": "extension/ui/resources/icon_128.png"
 	},
-	"version": "1.18.19",
+	"version": "1.18.20",
 	"description": "__MSG_extensionDescription__",
 	"content_scripts": [
 		{

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 	"name": "single-file",
-	"version": "0.1.19",
+	"version": "0.1.20",
 	"description": "SingleFile",
 	"author": "Gildas Lormeau",
 	"license": "AGPL-3.0-or-later",