Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
See: #1090
  • Loading branch information
dteviot committed Oct 12, 2023
1 parent 2d69f7b commit c5999f7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions plugin/js/parsers/Ffxs8Parser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"use strict";

parserFactory.register("ffxs8.com", () => new Ffxs8Parser());

class Ffxs8Parser extends Parser{
constructor() {
super();
}

async getChapterUrls(dom) {
let menu = dom.querySelector("div.catalog");
return util.hyperlinksToChapterList(menu);
}

findContent(dom) {
return dom.querySelector("div.content");
}

findChapterTitle(dom) {
return dom.querySelector("div.article h1");
}

findCoverImageUrl(dom) {
return util.getFirstImgSrc(dom, "div.cover");
}

async fetchChapter(url) {
return (await HttpClient.wrapFetch(url, this.makeOptions())).responseXML;
}

makeOptions() {
return ({
makeTextDecoder: () => new TextDecoder("gb2312")
});
}

getInformationEpubItemChildNodes(dom) {
return [...dom.querySelectorAll("div.descInfo")];
}
}
1 change: 1 addition & 0 deletions plugin/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ <h3>Instructions</h3>
<script src="js/parsers/ExiledrebelsscanlationsParser.js"></script>
<script src="js/parsers/FanFictionParser.js"></script>
<script src="js/parsers/FastNovelParser.js"></script>
<script src="js/parsers/Ffxs8Parser.js"></script>
<script src="js/parsers/FictionhuntParser.js"></script>
<script src="js/parsers/FictionManiaParser.js"></script>
<script src="js/parsers/FicwadParser.js"></script>
Expand Down

0 comments on commit c5999f7

Please sign in to comment.