summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/read.js4
-rw-r--r--read.html55
-rw-r--r--worker.js1
3 files changed, 5 insertions, 55 deletions
diff --git a/js/read.js b/js/read.js
index 1feb032..b79a551 100644
--- a/js/read.js
+++ b/js/read.js
@@ -55,16 +55,12 @@ function next_page() {
_store_position = 1;
window.book.rendition.next();
-
show_ui(false);
- request_fullscreen();
}
function prev_page() {
window.book.rendition.prev();
-
show_ui(false);
- request_fullscreen();
}
function hotkey_handler(e) {
diff --git a/read.html b/read.html
index 87dbbe0..0f3554b 100644
--- a/read.html
+++ b/read.html
@@ -170,7 +170,7 @@
<form class="form-horizontal" onsubmit="return false;">
<div class="form-group">
- <label class="col-sm-4 control-label">Search (active chapter)</label>
+ <label class="col-sm-4 control-label">Search</label>
<div class="col-sm-8">
<input type="search" class="form-control search_input">
</div>
@@ -649,55 +649,6 @@
});
- /*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) {
- if (nest == 3) return false;
-
- if (row.subitems) {
- $.each(row.subitems, function (i, r) {
-
- if (r.spinePos == book.currentChapter.spinePos) {
- toc_entry = r;
- return true;
- }
-
- if (iterate_sublist(r, nest + 1))
- return true;
- });
- }
-
- return false;
- }
-
- $.each(book.toc, function(i, a) {
- if (a.spinePos == book.currentChapter.spinePos) {
- toc_entry = a;
- return;
- }
-
- if (iterate_sublist(a, 0)) return;
-
- });
-
- console.log('toc', toc_entry);
-
- if (toc_entry) $(".chapter").html(toc_entry.label);
- }); */
-
book.ready.then(function() {
var meta = book.package.metadata;
@@ -825,6 +776,10 @@
rendition.on('relocated', function(location) {
+ // locations not generated yet
+ if (book.locations.length() == 0)
+ return;
+
$(".loading").hide();
var currentCfi = location.start.cfi;
diff --git a/worker.js b/worker.js
index 5197cb3..7b1d424 100644
--- a/worker.js
+++ b/worker.js
@@ -24,7 +24,6 @@ const CACHE_URLS = [
'lib/localforage.min.js',
'lib/jquery.mobile.custom.js',
'lib/holder.min.js',
- 'lib/smartimages.js',
'lib/bootstrap/v3/css/bootstrap-theme.min.css',
'lib/bootstrap/v3/css/bootstrap.min.css',
'lib/bootstrap/v3/js/jquery.js',