Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
See: #1011
  • Loading branch information
dteviot committed Sep 16, 2023
1 parent d7f807a commit dc07e4f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
35 changes: 35 additions & 0 deletions plugin/js/parsers/OctopiiParser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use strict";

parserFactory.register("octopii.co", () => new OctopiiParser());

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

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

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

extractTitleImpl(dom) {
return dom.querySelector("main h3");
}

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

getInformationEpubItemChildNodes(dom) {
return [...dom.querySelectorAll("div.description")];
}

cleanInformationNode(node) {
util.removeChildElementsMatchingCss(node, ".btn-show-more");
return node;
}
}
1 change: 1 addition & 0 deletions plugin/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ <h3>Instructions</h3>
<script src="js/parsers/NovicetranslationsParser.js"></script>
<script src="js/parsers/NrvnqsrParser.js"></script>
<script src="js/parsers/NyantlParser.js"></script>
<script src="js/parsers/OctopiiParser.js"></script>
<script src="js/parsers/OnlinenovelbookParser.js"></script>
<script src="js/parsers/OntimestoryParser.js"></script>
<script src="js/parsers/OssantlParser.js"></script>
Expand Down

0 comments on commit dc07e4f

Please sign in to comment.