summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-06-29 14:58:52 +0300
committerAndrew Dolgov <[email protected]>2018-06-29 14:58:52 +0300
commit888365e2e44845485af8ae50dc3163e919fc3a63 (patch)
treebe5b42344c9a24ff41e184394ec9a51e520e417f /read.html
parent2ec9a469649636c54977e9e1bfa04a493813b1a2 (diff)
add resized handler
Diffstat (limited to 'read.html')
-rw-r--r--read.html18
1 files changed, 14 insertions, 4 deletions
diff --git a/read.html b/read.html
index 9cc523f..50f660b 100644
--- a/read.html
+++ b/read.html
@@ -226,8 +226,7 @@
<div class="footer">
<div class="chapter" data-toggle="modal" data-target="#toc-modal"></div>
<div class="location">
- <span id="cur_page">?</span> / <span id="total_pages">?</span>
- (<span id="page_pct">?</span>)
+ <span id="page_pct">?</span>
</div>
</div>
@@ -817,6 +816,19 @@
rendition.on("keyup", hotkey_handler);
+ rendition.on('resized', function() {
+ console.log('resized');
+
+ $(".loading").show();
+ $(".loading_message").html("Opening chapter...");
+
+ window.setTimeout(function() {
+ open_lastread();
+
+ $(".loading").hide();
+ }, 250);
+ });
+
rendition.on('rendered', function(chapter) {
$(".chapter").html("");
@@ -868,8 +880,6 @@
var totalPages = 100;
var pct = book.locations.percentageFromCfi(currentCfi);
- $("#cur_page").html(currentPage);
- $("#total_pages").html(totalPages);
$("#page_pct").html(parseInt(pct*100) + '%');
if (_store_position && new Date().getTime()/1000 - _last_position_sync > 15) {