From c32ea6156e56f240f5ebc1d46348e80dc4a5fc55 Mon Sep 17 00:00:00 2001 From: daniel-j Date: Fri, 19 Aug 2016 12:22:41 +0200 Subject: [PATCH] quickfix! the sort broke the order :( --- extension/manifest.json | 2 +- package.json | 2 +- src/templates.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extension/manifest.json b/extension/manifest.json index 0cb0b37..36ffa1f 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -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" diff --git a/package.json b/package.json index ede5d9a..06773c2 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/templates.js b/src/templates.js index 57167e1..4c2e11f 100644 --- a/src/templates.js +++ b/src/templates.js @@ -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'}),