Skip to content

Commit b363014

Browse files
committed
Handle initial URL not ending with a "/" See: #2091
1 parent 71408fb commit b363014

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

plugin/js/parsers/Novel543Parser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ class Novel543Parser extends Parser {
88
}
99

1010
async getChapterUrls(dom) {
11-
let tocUrl = dom.baseURI + "dir";
11+
let tocUrl = dom.baseURI;
12+
tocUrl += tocUrl.endsWith("/")
13+
? "dir"
14+
: "/dir";
1215
let nextDom = (await HttpClient.wrapFetch(tocUrl)).responseXML;
1316
let menu = nextDom.querySelector("div.chaplist ul:nth-of-type(2)");
1417
return util.hyperlinksToChapterList(menu);

0 commit comments

Comments
 (0)