Fix disappearing page bug when opening in new tab

This commit is contained in:
Oliver Blanthorn 2023-04-05 20:44:38 +02:00
parent 93352f08b5
commit e51136e50a
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -5996,7 +5996,7 @@ import { Readability } from "@mozilla/readability"
//#content_helper
export async function readerurl() {
document.querySelectorAll(".TridactylStatusIndicator").forEach(ind => ind.parentNode.removeChild(ind))
const article = new Readability(document).parse()
const article = new Readability(document.cloneNode(true) as any as Document).parse()
article["link"] = window.location.href
return browser.runtime.getURL("static/reader.html#" + btoa(encodeURIComponent(JSON.stringify(article))))
}