Use original hrefs for external links and add isExternal in fb2.js (#129)

This commit is contained in:
Francesco Martini
2026-05-01 19:24:25 +00:00
committed by GitHub
parent 76dcd8f0f7
commit 78914aef44
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -351,6 +351,7 @@ export const makeFB2 = async blob => {
}
book.splitTOCHref = href => href?.split('#')?.map(x => Number(x)) ?? []
book.getTOCFragment = (doc, id) => doc.querySelector(`[${dataID}="${id}"]`)
book.isExternal = uri => /^\w+:/i.test(uri)
book.destroy = () => {
for (const url of urls) URL.revokeObjectURL(url)