Skip to content

Commit

Permalink
Fix eslint warnings for KemonopartyParser
Browse files Browse the repository at this point in the history
And added perishableloc to credits.
  • Loading branch information
dteviot committed Jan 17, 2024
1 parent 6cd5e0f commit acee3bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
{ "name": "xRahul"},
{ "name": "Oleksii Taranenko"},
{ "name": "Naheulf"},
{ "name": "perishableloc"},
{ "name": "praschke"}
],
"license": "GPL-3.0-only",
Expand Down
6 changes: 3 additions & 3 deletions plugin/js/parsers/KemonopartyParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ class KemonopartyParser extends Parser{
let urls = [];
let paginator = dom.querySelector("div.paginator menu");
if (paginator === null) {
return urls;
return urls;
}
let pages = [...paginator.querySelectorAll("a:not(.next)")];
let url = new URL(pages[pages.length - 1]);
let lastPageOffset = url.searchParams.get("o");
for(let i = 50; i <= lastPageOffset; i += 50) {
url.searchParams.set("o", i);
urls.push(url.href);
url.searchParams.set("o", i);
urls.push(url.href);
}
return urls;
}
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Credits
* xRahul
* Oleksii Taranenko
* Naheulf
* perishableloc
* praschke

## How to use with Baka-Tsuki:
Expand Down

0 comments on commit acee3bf

Please sign in to comment.