Show reading progress in reader

This commit is contained in:
Alex Ling
2020-03-13 01:05:16 +00:00
parent dc5284968d
commit 318501bc9b
2 changed files with 6 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ $('#page-select').change(function(){
jumpTo(parseInt($('#page-select').val()));
});
function showControl(idx) {
const pageCount = $('#page-select > option').length;
const progressText = `Progress: ${idx}/${pageCount} (${(idx/pageCount * 100).toFixed(1)}%)`;
$('#progress-label').text(progressText);
$('#page-select').val(idx);
UIkit.modal($('#modal-sections')).show();
styleModal();