summaryrefslogtreecommitdiff
path: root/js/read.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-26 13:42:00 +0300
committerAndrew Dolgov <[email protected]>2017-02-26 13:42:00 +0300
commit8aaf1fad0c1cfa65132f052f0f98b3452ddc4eeb (patch)
tree2b44d22cb37d126caca770eb63d6608b6efb8000 /js/read.js
parent84230a6809d7ce8bd5d0161d1f91df4a4b7b32a0 (diff)
various offline-related fixes
Diffstat (limited to 'js/read.js')
-rw-r--r--js/read.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/read.js b/js/read.js
index dc968f4..4fb74ce 100644
--- a/js/read.js
+++ b/js/read.js
@@ -113,9 +113,10 @@ function save_and_close() {
if (navigator.onLine) {
var currentPage = book.pagination.pageFromCfi(book.getCurrentLocationCfi());
var currentCfi = book.getCurrentLocationCfi();
+ var totalPages = book.pagination.totalPages;
localforage.setItem("epube-book." + $.urlParam("b") + ".lastread",
- {cfi: currentCfi, page: currentPage});
+ {cfi: currentCfi, page: currentPage, total: totalPages});
$.post("backend.php", { op: "storelastread", id: $.urlParam("id"), page: currentPage,
cfi: currentCfi }, function(data) {