瀏覽代碼

move favicons into the head if needed

Gildas 7 年之前
父節點
當前提交
625bb6a112
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -461,7 +461,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 		preProcessPage() {
 			this.doc.querySelectorAll("singlefile-infobar, singlefile-mask").forEach(element => element.remove());
 			if (this.options.win) {
-				this.doc.body.querySelectorAll(":not(svg) title, meta").forEach(element => element instanceof this.options.win.HTMLElement && this.doc.head.appendChild(element));
+				this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element => element instanceof this.options.win.HTMLElement && this.doc.head.appendChild(element));
 			}
 			if (this.options.imageData) {
 				const dataAttributeName = DOM.imagesAttributeName(this.options.sessionId);