Просмотр исходного кода

move favicons into the head if needed

Gildas 7 лет назад
Родитель
Сommit
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);