allow paging if no page is specified
This commit is contained in:
parent
1b27e59b13
commit
7d8af3da23
1 changed files with 7 additions and 1 deletions
8
index.js
8
index.js
|
@ -54,7 +54,13 @@ async function clickLi(e) {
|
|||
|
||||
async function goPage(count) {
|
||||
let counter = input.value.match(/[^\s]+$/g);
|
||||
if (!counter) return false;
|
||||
if (!counter) {
|
||||
counter = ['1'];
|
||||
}
|
||||
|
||||
if (isNaN(counter[0] * 1)) {
|
||||
counter[0] = ['1'];
|
||||
}
|
||||
|
||||
input.value = `${input.value.match(/^[^\s]+/g)[0]} ${counter[0] * 1 + count}`;
|
||||
main(new Event('placeholder'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue