feat: save page to url
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<h1>IPA Archive</h1>
|
<h1>IPA Archive</h1>
|
||||||
<form onsubmit="event.preventDefault(); searchIPA(); return false;" autocomplete="off">
|
<form onsubmit="event.preventDefault(); searchIPA(); return false;" autocomplete="off">
|
||||||
|
<input id="page" hidden>
|
||||||
<label for="search">Search: <input id="search" placeholder="Search"></label>
|
<label for="search">Search: <input id="search" placeholder="Search"></label>
|
||||||
<label for="bundleid">BundleId: <input id="bundleid" placeholder="com.gameloft."></label>
|
<label for="bundleid">BundleId: <input id="bundleid" placeholder="com.gameloft."></label>
|
||||||
<label for="unique">Unique: <input id="unique" type="checkbox"></label>
|
<label for="unique">Unique: <input id="unique" type="checkbox"></label>
|
||||||
|
|||||||
11
script.js
11
script.js
@@ -124,13 +124,18 @@ function applySearch() {
|
|||||||
function searchByBundleId(sender) {
|
function searchByBundleId(sender) {
|
||||||
document.getElementById('bundleid').value = sender.innerText;
|
document.getElementById('bundleid').value = sender.innerText;
|
||||||
document.getElementById('search').value = '';
|
document.getElementById('search').value = '';
|
||||||
|
document.getElementById('page').value = null;
|
||||||
document.getElementById('unique').checked = false;
|
document.getElementById('unique').checked = false;
|
||||||
searchIPA();
|
searchIPA();
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchIPA() {
|
function searchIPA(restorePage) {
|
||||||
|
var page = 0;
|
||||||
|
if (restorePage) {
|
||||||
|
page = document.getElementById('page').value;
|
||||||
|
}
|
||||||
applySearch();
|
applySearch();
|
||||||
printIPA();
|
printIPA((page || 0) * PER_PAGE);
|
||||||
saveConfig();
|
saveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,6 +242,8 @@ function printIPA(offset) {
|
|||||||
|
|
||||||
function p(page) {
|
function p(page) {
|
||||||
printIPA(page * PER_PAGE);
|
printIPA(page * PER_PAGE);
|
||||||
|
document.getElementById('page').value = page || null;
|
||||||
|
saveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
function paginationShort(page, pages) {
|
function paginationShort(page, pages) {
|
||||||
|
|||||||
Reference in New Issue
Block a user