mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Fix method definition
This commit is contained in:
@@ -703,12 +703,6 @@ export class EPUB {
|
||||
else this.metadata[key] = [value]
|
||||
}))
|
||||
|
||||
this.getCover = async () => {
|
||||
const cover = this.resources?.cover
|
||||
return cover?.href
|
||||
? new Blob([await this.loadBlob(cover.href)], { type: cover.mediaType })
|
||||
: null
|
||||
}
|
||||
return this
|
||||
}
|
||||
async loadDocument(item) {
|
||||
@@ -736,6 +730,12 @@ export class EPUB {
|
||||
isExternal(uri) {
|
||||
return isExternal(uri)
|
||||
}
|
||||
async getCover() {
|
||||
const cover = this.resources?.cover
|
||||
return cover?.href
|
||||
? new Blob([await this.loadBlob(cover.href)], { type: cover.mediaType })
|
||||
: null
|
||||
}
|
||||
async getCalibreBookmarks() {
|
||||
const txt = await this.loadText('META-INF/calibre_bookmarks.txt')
|
||||
const magic = 'encoding=json+base64:'
|
||||
|
||||
Reference in New Issue
Block a user