Skip to content

Commit

Permalink
Add site wetried.site
Browse files Browse the repository at this point in the history
  • Loading branch information
ImLJS committed Feb 20, 2024
1 parent 5dcaa00 commit ca221c9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions plugin/js/parsers/WetriedParser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
"use strict";

parserFactory.register("wetriedtls.site", function () {return new WetriedParser();});

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

async getChapterUrls(dom) {
return [...dom.querySelectorAll("div[role='tabpanel'] a")]
.map(a => util.hyperLinkToChapter(a))
.reverse();
}

findContent(dom) {
return (
dom.querySelector("#reader-container") || dom.querySelector("#chapter-content")
);
}

extractTitleImpl(dom) {
return dom.querySelector("h1");
}

findCoverImageUrl(dom) {
return util.getFirstImgSrc(dom, "div.w-full");
}

getInformationEpubItemChildNodes(dom) {
return [...dom.querySelectorAll("div.p-5")];
}
}
1 change: 1 addition & 0 deletions plugin/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@ <h3>Instructions</h3>
<script src="js/parsers/WatashiwasugoidesuParser.js"></script>
<script src="js/parsers/WattpadParser.js"></script>
<script src="js/parsers/WebNovelOnlineParser.js"></script>
<script src="js/parsers/WetriedParser.js"></script>
<script src="js/parsers/WikipediaParser.js"></script>
<script src="js/parsers/WixParser.js"></script>
<script src="js/parsers/WnmtlOrgParser.js"></script>
Expand Down

0 comments on commit ca221c9

Please sign in to comment.