mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
KF8: remove KindleUnpack compat
- KindleUnpack's rules for when to insert the coverpage seems a bit too involved to replicate exactly. - The feature is marked "XXX experimental" in KindleUnpack source code after 10 years. - The feature makes no sense as the cover page might not even exist in the source EPUB in the first place. It seems to me now that it might be better to just bite the bullet.
This commit is contained in:
@@ -971,18 +971,13 @@ class KF8 {
|
||||
}
|
||||
}
|
||||
|
||||
// insert cover page for CFI compatibility with KindleUnpack,
|
||||
// which will pretty much always insert a cover page;
|
||||
// it will not be accessible in any way, so just insert a dummy section
|
||||
this.#sections.unshift({ frags: [] })
|
||||
|
||||
this.sections = this.#sections.map((section, index) =>
|
||||
section.frags.length ? ({
|
||||
id: index,
|
||||
load: () => this.loadSection(section),
|
||||
createDocument: () => this.createDocument(section),
|
||||
size: section.length,
|
||||
pageSpread: pageSpreads.get(index - 1),
|
||||
pageSpread: pageSpreads.get(index),
|
||||
}) : ({ linear: 'no' }))
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user