mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-05-18 19:33:38 +12:00
quickfix! the sort broke the order :(
This commit is contained in:
parent
8a9bbece0d
commit
c32ea6156e
|
@ -4,7 +4,7 @@
|
|||
"name": "fimfic2epub",
|
||||
"short_name": "fimfic2epub",
|
||||
"description": "Improved EPUB exporter for Fimfiction",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
|
||||
"icons": {
|
||||
"128": "icon-128.png"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fimfic2epub",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"description": "Tool to generate improved EPUB ebooks from Fimfiction stories",
|
||||
"author": "djazz",
|
||||
"repository": {
|
||||
|
|
|
@ -78,7 +78,7 @@ export function createChapter (ch, html, callback) {
|
|||
}
|
||||
|
||||
// some eReaders doesn't understand linear=no, so sort those items to the end of the spine/book.
|
||||
function sortItemsLinear (a, b) {
|
||||
/* function sortItemsLinear (a, b) {
|
||||
let linearA = a.attrs.linear !== 'no'
|
||||
let linearB = b.attrs.linear !== 'no'
|
||||
if (linearA === linearB) {
|
||||
|
@ -88,7 +88,7 @@ function sortItemsLinear (a, b) {
|
|||
} else {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
export function createOpf (ffc) {
|
||||
let remotes = []
|
||||
|
@ -142,7 +142,7 @@ export function createOpf (ffc) {
|
|||
m('itemref', {idref: 'nav', linear: ffc.storyInfo.chapters.length <= 1 ? 'no' : undefined})
|
||||
].concat(ffc.storyInfo.chapters.map((ch, num) =>
|
||||
m('itemref', {idref: 'chapter_' + zeroFill(3, num + 1)})
|
||||
)).sort(sortItemsLinear)),
|
||||
))),
|
||||
|
||||
m('guide', [
|
||||
m('reference', {type: 'cover', title: 'Cover', href: 'Text/cover.xhtml'}),
|
||||
|
|
Loading…
Reference in a new issue