summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/read.js4
-rw-r--r--read.html5
2 files changed, 2 insertions, 7 deletions
diff --git a/js/read.js b/js/read.js
index 0e1da94..cf71462 100644
--- a/js/read.js
+++ b/js/read.js
@@ -1,8 +1,4 @@
-var _store_position = 0;
-
function next_page() {
- _store_position = 1;
-
window.book.nextPage();
}
diff --git a/read.html b/read.html
index 365a64a..5243f55 100644
--- a/read.html
+++ b/read.html
@@ -542,6 +542,7 @@
});
rendered.then(function() {
+ _last_position_sync = new Date().getTime()/1000;
localforage.getItem(cacheId("pagination")).then(function(pageList) {
@@ -640,7 +641,7 @@
$("#page_pct").html(pct + "%");
}
- if (_store_position && new Date().getTime()/1000 - _last_position_sync > 15) {
+ if (new Date().getTime()/1000 - _last_position_sync > 15) {
console.log("storing lastread");
var currentCfi = book.getCurrentLocationCfi();
@@ -658,8 +659,6 @@
});
- _store_position = 0;
-
} else {
_last_position_sync = 0;
}