mirror of
https://github.com/daniel-j/fimfic2epub.git
synced 2024-09-18 18:27:33 +12:00
pack zip
This commit is contained in:
parent
b43e3156f5
commit
bbba141ef6
4 changed files with 4 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,4 +5,5 @@ extension/eventPage.js
|
|||
extension.crx
|
||||
extension.pem
|
||||
extension.xpi
|
||||
extension.zip
|
||||
fimfic2epub.safariextension/
|
||||
|
|
|
@ -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",
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue