Update BetterSearchPage.plugin.js

This commit is contained in:
Mirco Wittrien 2019-02-27 18:36:12 +01:00
parent f289b1d538
commit ae36f5add2
1 changed files with 1 additions and 1 deletions

View File

@ -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;