This commit is contained in:
Daniel J 2016-06-23 16:25:18 +02:00
parent b43e3156f5
commit bbba141ef6
4 changed files with 4 additions and 8 deletions

1
.gitignore vendored
View file

@ -5,4 +5,5 @@ extension/eventPage.js
extension.crx
extension.pem
extension.xpi
extension.zip
fimfic2epub.safariextension/

View file

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "fimfic2epub",
"short_name": "ff2epub",
"short_name": "fimfic2epub",
"description": "Improved EPUB exporter for Fimfiction",
"version": "1.0.3",

View file

@ -4,6 +4,8 @@ CHROME=`command -v chrome || command -v chromium || command -v "/Applications/Go
rm -f extension.crx
z=`cd extension && zip -Xr9D ../extension.zip .`
code=-1
if [ ! -f extension.pem ]; then

View file

@ -10,13 +10,6 @@ import { NS, tidyOptions } from './constants'
const entities = new XmlEntities()
export default function parseChapter (num, ch, html, remoteResources, callback) {
let chapterTitle = html.match(/<a\s+[^>]*id="chapter_title"[^>]*>(.*?)<\/a>/)
if (!chapterTitle) {
return tidy('<?xml version="1.0" encoding="utf-8"?>\n' + chapterPage, tidyOptions)
}
chapterTitle = chapterTitle[1]
let chapterPos = html.indexOf('<div id="chapter_container">')
let chapter = html.substring(chapterPos + 29)