- make the page parameter in reader the actual page number instead of

index
This commit is contained in:
Alex Ling
2020-02-15 16:50:38 +00:00
parent d36aed3595
commit 87255e8996
3 changed files with 10 additions and 10 deletions

View File

@@ -57,12 +57,12 @@ $('#page-select').change(function(){
jumpTo(parseInt($('#page-select').val()));
});
function showControl(idx) {
$('#page-select').val(idx + 1);
$('#page-select').val(idx);
UIkit.modal($('#modal-sections')).show();
}
function jumpTo(page) {
var ary = window.location.pathname.split('/');
ary[ary.length - 1] = page - 1;
ary[ary.length - 1] = page;
ary.shift(); // remove leading `/`
ary.unshift(window.location.origin);
window.location.replace(ary.join('/'));