Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
See: #1069
  • Loading branch information
dteviot committed Sep 11, 2023
1 parent 7aacf53 commit e022a90
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions plugin/js/parsers/BookswithqianyaParser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use strict";

parserFactory.register("bookswithqianya.com", () => new BookswithqianyaParser());

class BookswithqianyaParser extends WordpressBaseParser{
constructor() {
super();
}

async getChapterUrls(dom) {
return [...dom.querySelectorAll("div.elementor-tab-content a")]
.map(a => util.hyperLinkToChapter(a))
.filter(c => this.isChapterUrl(c.sourceUrl));
}

isChapterUrl(url) {
return !url.includes("/products/")
&& !url.includes("/novels/")
&& !url.includes("myrics");
}

extractTitleImpl(dom) {
return dom.querySelector(".elementor-image-box-title");
}

removeUnwantedElementsFromContentElement(element) {
util.removeChildElementsMatchingCss(element, "button");
super.removeUnwantedElementsFromContentElement(element);
}
}
1 change: 1 addition & 0 deletions plugin/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ <h3>Instructions</h3>
<script src="js/parsers/BetwixtedbutterflyParser.js"></script>
<script src="js/parsers/BlogspotParser.js"></script>
<script src="js/parsers/BookalbParser.js"></script>
<script src="js/parsers/BookswithqianyaParser.js"></script>
<script src="js/parsers/Booktoki152Parser.js"></script>
<script src="js/parsers/BoxnovelOrgParser.js"></script>
<script src="js/parsers/Bqg225Parser.js"></script>
Expand Down

0 comments on commit e022a90

Please sign in to comment.