summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-05-24 12:36:52 +0300
committerAndrew Dolgov <[email protected]>2017-05-24 12:36:52 +0300
commit3e3e4516d8888aea3ba315241272ec9bb216bae4 (patch)
treec69cb08bc3aea66ed116977fa7915b6febe46d63 /read.html
parent20e507b29ead95c047c1166657d89cae13e304fd (diff)
Revert "remove _store_position"
This reverts commit 20e507b29ead95c047c1166657d89cae13e304fd.
Diffstat (limited to 'read.html')
-rw-r--r--read.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/read.html b/read.html
index 5243f55..365a64a 100644
--- a/read.html
+++ b/read.html
@@ -542,7 +542,6 @@
});
rendered.then(function() {
- _last_position_sync = new Date().getTime()/1000;
localforage.getItem(cacheId("pagination")).then(function(pageList) {
@@ -641,7 +640,7 @@
$("#page_pct").html(pct + "%");
}
- if (new Date().getTime()/1000 - _last_position_sync > 15) {
+ if (_store_position && new Date().getTime()/1000 - _last_position_sync > 15) {
console.log("storing lastread");
var currentCfi = book.getCurrentLocationCfi();
@@ -659,6 +658,8 @@
});
+ _store_position = 0;
+
} else {
_last_position_sync = 0;
}