Update BetterSearchPage.plugin.js
This commit is contained in:
parent
f289b1d538
commit
ae36f5add2
|
@ -140,7 +140,7 @@ class BetterSearchPage {
|
||||||
if (!pagination || !searchId || document.querySelector(".BSP-pagination, .BSP-pagination-button, .BSP-pagination-jumpinput")) return;
|
if (!pagination || !searchId || document.querySelector(".BSP-pagination, .BSP-pagination-button, .BSP-pagination-jumpinput")) return;
|
||||||
let searchResultsWrapper = BDFDB.getParentEle(BDFDB.dotCN.searchresultswrapper, pagination);
|
let searchResultsWrapper = BDFDB.getParentEle(BDFDB.dotCN.searchresultswrapper, pagination);
|
||||||
if (!searchResultsWrapper) return;
|
if (!searchResultsWrapper) return;
|
||||||
let numbers = pagination.textContent.split(/[^\d]/).filter(n => n);
|
let numbers = pagination.textContent.replace(/\s/g,"").split(/[^\d]/).filter(n => n);
|
||||||
let currentpage = parseInt(numbers[0]);
|
let currentpage = parseInt(numbers[0]);
|
||||||
let maxpage = parseInt(numbers[1]);
|
let maxpage = parseInt(numbers[1]);
|
||||||
if (isNaN(currentpage) || isNaN(maxpage)) return;
|
if (isNaN(currentpage) || isNaN(maxpage)) return;
|
||||||
|
|
Loading…
Reference in New Issue