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();

View File

@ -37,6 +37,9 @@
<h3 class="uk-modal-title">Options</h3>
</div>
<div class="uk-modal-body">
<div class="uk-margin">
<p id="progress-label"></p>
</div>
<div class="uk-margin">
<label class="uk-form-label" for="form-stacked-select">Jump to page</label>
<div class="uk-form-controls">