summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-26 13:59:20 +0300
committerAndrew Dolgov <[email protected]>2017-02-26 13:59:20 +0300
commit6f0d0b811ad17f82acb2e798dba355d5b82af30d (patch)
tree1dccc88cf5c976d206ba7cb494725d78a1402d18 /read.html
parent8aaf1fad0c1cfa65132f052f0f98b3452ddc4eeb (diff)
upd readme
Diffstat (limited to 'read.html')
-rw-r--r--read.html7
1 files changed, 6 insertions, 1 deletions
diff --git a/read.html b/read.html
index aafbc96..040a363 100644
--- a/read.html
+++ b/read.html
@@ -372,7 +372,12 @@
if (navigator.onLine) {
$.post("backend.php", { op: "getlastread", id: $.urlParam("id") }, function(data) {
- if (navigator.onLine && data && data.cfi) {
+ console.log(data);
+
+ if (navigator.onLine && data) {
+ localforage.setItem(cacheId("lastread"),
+ {cfi: data.cfi, page: data.page, total: data.total});
+
book.gotoCfi(data.cfi);
} else {
localforage.getItem(cacheId("lastread")).then(function(item) {