summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-14 09:15:19 +0300
committerAndrew Dolgov <[email protected]>2020-09-14 09:15:19 +0300
commitfd5e896cca520e55b89f2b24f7cbb0c326f63124 (patch)
tree92ee9a23ce0a86c10cdcdfd6d290e305a5756461 /js
parentf462e1c03d72f22e9275be2a133fbe40db003154 (diff)
reset to beginning of book when clearing stored lastread
Diffstat (limited to 'js')
-rw-r--r--js/reader.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/reader.js b/js/reader.js
index 1244899..923a000 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -985,6 +985,9 @@ const Reader = {
localforage.setItem(Reader.cacheId("lastread"),
{cfi: "", page: 0, total: total});
+ window.setTimeout(function() {
+ window.book.rendition.display(window.book.locations.cfiFromPercentage(0));
+ }, 250);
}
},
openLastRead: function(local_only) {