Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
See: #1023
  • Loading branch information
dteviot committed Oct 14, 2023
1 parent 2b0e472 commit 4c1a0e0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/js/parsers/4kswParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class _4kswParser extends Parser{
}

findChapterTitle(dom) {
return dom.querySelector(".panel-heading").textContent;
return dom.querySelector(".panel-heading");
}

findCoverImageUrl(dom) {
Expand Down
33 changes: 33 additions & 0 deletions plugin/js/parsers/XklxswParser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"use strict";

parserFactory.register("m.xklxsw.net", () => new XklxswParser());

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

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

findContent(dom) {
return dom.querySelector("#nr");
}

extractTitleImpl(dom) {
return dom.querySelector(".cover h2 a");
}
findChapterTitle(dom) {
return dom.querySelector("#nr_title");
}

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

getInformationEpubItemChildNodes(dom) {
return [...dom.querySelectorAll(".intro_info")];
}
}
1 change: 1 addition & 0 deletions plugin/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ <h3>Instructions</h3>
<script src="js/parsers/WorldnovelOnlineParser.js"></script>
<script src="js/parsers/XiaoshuoguiParser.js"></script>
<script src="js/parsers/XiaxuenovelsParser.js"></script>
<script src="js/parsers/XklxswParser.js"></script>
<script src="js/parsers/YushuboParser.js"></script>
<script src="js/parsers/AsianHobbyistParser.js"></script>
<script src="js/parsers/FoxaholicParser.js"></script>
Expand Down

0 comments on commit 4c1a0e0

Please sign in to comment.