Skip to content

Commit

Permalink
Merge pull request #1527 from Kiradien/#1454-Xenforo_Batch_Post_DL
Browse files Browse the repository at this point in the history
Update XenforoBatchParser.js
  • Loading branch information
Kiradien authored Sep 29, 2024
2 parents bfae6b8 + b7f5048 commit 0696b59
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions plugin/js/parsers/XenforoBatchParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,10 @@ class XenforoBatchParser extends Parser{
}
pagingUriComponent = new RegExp(baseURI+"(.*?)\\d+/?$").exec(lastPage.href)[1] ?? pagingUriComponent;
}
let chapters = [...Array(pageCount).keys()].map(index => {
var link = dom.createElement("a");
link.setAttribute("href", `${baseURI}${pagingUriComponent}${index}`); //ChangeMe!
link.appendChild(dom.createTextNode(`Page ${index + 1}`));
return link;
});

return chapters.map(a => util.hyperLinkToChapter(a));
return [...Array(pageCount).keys()].map(index => ({
sourceUrl: `${baseURI}${pagingUriComponent}${index}`,
title: `Page ${index + 1}`
}));
}

async fetchChapter(url) {
Expand Down

0 comments on commit 0696b59

Please sign in to comment.