summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-02-21 13:29:06 +0300
committerAndrew Dolgov <[email protected]>2018-02-21 13:29:06 +0300
commit256e97d1e9293fc29680e9860c4c7714042aba63 (patch)
tree9a7b8ecd83f2cf02f72792f2d877c6934c57d985 /read.html
parent550cf1677cd5ee201198dccd207a8012ec243e14 (diff)
add a .loading hack to hide transitions playing when going to previous chapter
Diffstat (limited to 'read.html')
-rw-r--r--read.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/read.html b/read.html
index 339e41b..f5aed25 100644
--- a/read.html
+++ b/read.html
@@ -623,6 +623,16 @@
book.on("renderer:chapterDisplayed", function() {
$(".chapter").html("");
+ localforage.getItem("epube.disable-transitions").then(function(notransitions) {
+ if (notransitions) {
+ $(".loading").hide();
+ } else {
+ window.setTimeout(function() {
+ $(".loading").hide();
+ }, 500);
+ }
+ } );
+
var toc_entry = false;
function iterate_sublist(row, nest) {
@@ -785,8 +795,6 @@
book.on('book:pageChanged', function(location) {
- //console.log(location);
- $(".loading").hide();
$("#cur_page").html(location.anchorPage);
var total = book.pagination.totalPages;