Skip to content

Commit

Permalink
Add site https://trxs.me/
Browse files Browse the repository at this point in the history
See: #1090
  • Loading branch information
dteviot committed Oct 16, 2023
1 parent 2589bdb commit 26fa486
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/TrxsParser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"use strict";

parserFactory.register("trxs.me", () => new TrxsParser());

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

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

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

findChapterTitle(dom) {
return dom.querySelector(".read_chapterName.tc h1");
}

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

async fetchChapter(url) {
let options = { makeTextDecoder: () => new TextDecoder("gb2312") };
return (await HttpClient.wrapFetch(url, options)).responseXML;
}

getInformationEpubItemChildNodes(dom) {
return [...dom.querySelectorAll(".infos p")];
}
}
1 change: 1 addition & 0 deletions plugin/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ <h3>Instructions</h3>
<script src="js/parsers/TravistranslationsParser.js"></script>
<script src="js/parsers/TruyenfullParser.js"></script>
<script src="js/parsers/TruyenyyParser.js"></script>
<script src="js/parsers/TrxsParser.js"></script>
<script src="js/parsers/TumblrParser.js"></script>
<script src="js/parsers/UltimaguilParser.js"></script>
<script src="js/parsers/UnlimitedNovelFailuresParser.js"></script>
Expand Down

0 comments on commit 26fa486

Please sign in to comment.