From 256e97d1e9293fc29680e9860c4c7714042aba63 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 21 Feb 2018 13:29:06 +0300 Subject: add a .loading hack to hide transitions playing when going to previous chapter --- read.html | 12 ++++++++++-- 1 file 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; -- cgit v1.2.3