diff --git a/src/excmds.ts b/src/excmds.ts index 2a08ac35..7eea821a 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -6223,6 +6223,7 @@ export async function readerurl() { document.querySelectorAll(".TridactylStatusIndicator").forEach(ind => ind.parentNode.removeChild(ind)) const article = new Readability(document.cloneNode(true) as any as Document).parse() article["link"] = window.location.href + article["favicon"] = (await ownTab()).favIconUrl return browser.runtime.getURL("static/reader.html#" + btoa(encodeURIComponent(JSON.stringify(article)))) } diff --git a/src/reader.ts b/src/reader.ts index adb61357..f998a971 100644 --- a/src/reader.ts +++ b/src/reader.ts @@ -45,6 +45,12 @@ async function updatePage() { } else { document.getElementById("tricanonlink")?.remove() } + if (article.favicon !== undefined) { + const icon = document.createElement("link") + icon.rel = "icon" + icon.href = article.favicon + document.head.appendChild(icon) + } } window.addEventListener("load", updatePage)