fix: reload correct page
This commit is contained in:
@@ -41,7 +41,7 @@ function loadDB() {
|
|||||||
loadFile('data/ipa.json', setMessage, function (data) {
|
loadFile('data/ipa.json', setMessage, function (data) {
|
||||||
DB = JSON.parse(data);
|
DB = JSON.parse(data);
|
||||||
setMessage('ready. Links in database: ' + DB.length);
|
setMessage('ready. Links in database: ' + DB.length);
|
||||||
if (config && config.page > 0) {
|
if (config && (config.page > 0 || config.search || config.bundleId)) {
|
||||||
searchIPA(true);
|
searchIPA(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -145,6 +145,8 @@ function searchIPA(restorePage) {
|
|||||||
var page = 0;
|
var page = 0;
|
||||||
if (restorePage) {
|
if (restorePage) {
|
||||||
page = document.getElementById('page').value;
|
page = document.getElementById('page').value;
|
||||||
|
} else {
|
||||||
|
document.getElementById('page').value = null;
|
||||||
}
|
}
|
||||||
applySearch();
|
applySearch();
|
||||||
printIPA((page || 0) * PER_PAGE);
|
printIPA((page || 0) * PER_PAGE);
|
||||||
|
|||||||
Reference in New Issue
Block a user