diff --git a/epub.js b/epub.js index 4247cb9..1c7fed5 100644 --- a/epub.js +++ b/epub.js @@ -736,4 +736,12 @@ export class EPUB { isExternal(uri) { return isExternal(uri) } + async getCalibreBookmarks() { + const txt = await this.loadText('META-INF/calibre_bookmarks.txt') + const magic = 'encoding=json+base64:' + if (txt?.startsWith(magic)) { + const json = atob(txt.slice(magic.length)) + return JSON.parse(json) + } + } }