summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-26 19:05:07 +0300
committerAndrew Dolgov <[email protected]>2017-02-26 19:05:07 +0300
commitbd6cc25bc5cabe4bf4f2ec9ccf4da8bd37fcbfa7 (patch)
tree8982886bcbf11870cef38b57ace2ca90f9b1a082
parentfafcfcd6755642225b428013f506da985ec6dd99 (diff)
show an indicator while chapter is loaded by epub.js
-rw-r--r--css/read.css5
-rw-r--r--read.html10
2 files changed, 14 insertions, 1 deletions
diff --git a/css/read.css b/css/read.css
index a4851ce..6ef5db2 100644
--- a/css/read.css
+++ b/css/read.css
@@ -16,7 +16,10 @@
display : table-cell;
vertical-align : middle;
}
-
+.notice {
+ width : 120px;
+ padding-left : 5px;
+}
.header {
top : 5px;
left : 0px;
diff --git a/read.html b/read.html
index f42fa82..0f60695 100644
--- a/read.html
+++ b/read.html
@@ -142,6 +142,7 @@
</div>
<div class="footer">
+ <div class="notice bg-warning text-warning" style="display : none"></div>
<div class="location">
Loc: <span id="cur_page">-1</span> / <span id="total_pages">-1</span>
</div>
@@ -326,6 +327,15 @@
});
})
+ book.on("renderer:chapterUnloaded", function() {
+ $(".notice").html("Loading...").show();
+
+ });
+
+ book.on("renderer:chapterDisplayed", function() {
+ $(".notice").hide();
+ });
+
book.on("renderer:chapterDisplayed", function() {
$("#reader iframe")[0].contentWindow.onmousewheel = function(event) {