diff options
-rw-r--r-- | js/read.js | 4 | ||||
-rw-r--r-- | read.html | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,8 @@ +var _store_position = 0; + function next_page() { + _store_position = 1; + window.book.nextPage(); } @@ -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; } |