mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Use original hrefs for external links and add isExternal in fb2.js (#129)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user