From 750df5b434fc8f7600c05d38f24a18702e5ab1e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20J=C3=B6nsson?= Date: Mon, 26 Mar 2018 08:50:20 +0200 Subject: [PATCH] Add chapter link after author note in index --- src/FimFic2Epub.js | 3 ++- src/templates.js | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FimFic2Epub.js b/src/FimFic2Epub.js index 41b3818..3783718 100644 --- a/src/FimFic2Epub.js +++ b/src/FimFic2Epub.js @@ -405,7 +405,8 @@ class FimFic2Epub extends EventEmitter { if (this.options.includeAuthorNotes && this.options.useAuthorNotesIndex && chapter.notes) { chain = chain.then(template.createChapter.bind(null, this, { title: 'Author\'s Note: ' + ch.title, - content: chapter.notes + content: chapter.notes, + index: i }, true)).then((html) => { this.findRemoteResources('note_' + zeroFill(3, i + 1), {note: i}, html) this.notesHtml[i] = html diff --git a/src/templates.js b/src/templates.js index 004fc6a..81633ac 100644 --- a/src/templates.js +++ b/src/templates.js @@ -100,9 +100,10 @@ export function createChapter (ffc, ch, isNotesChapter) { m('hr.old') ]) : null, tokenContent, - (link || linkNotes) ? m('p.double', {style: 'text-align: center; clear: both;'}, + (link || linkNotes || isNotesChapter) ? m('p.double', {style: 'text-align: center; clear: both;'}, link ? m('a.chaptercomments', {href: link + '#comment_list'}, 'Read chapter comments online') : null, - linkNotes ? m('a.chaptercomments', {href: linkNotes}, 'Read author\'s note') : null + linkNotes ? m('a.chaptercomments', {href: linkNotes}, 'Read author\'s note') : null, + isNotesChapter ? m('a.chaptercomments', {href: './chapter_' + zeroFill(3, index + 1) + '.xhtml'}, 'Read chapter') : null ) : null, !isNotesChapter && ffc.options.addChapterBars ? chapterBars(ffc.storyInfo.chapters, index) : null ]))