summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/read.css2
-rw-r--r--js/read.js4
-rw-r--r--js/reader.js9
-rw-r--r--read.html30
4 files changed, 15 insertions, 30 deletions
diff --git a/css/read.css b/css/read.css
index 6b9ddd2..512e151 100644
--- a/css/read.css
+++ b/css/read.css
@@ -100,7 +100,7 @@
right : 32px;
}
.toolbar {
- width : 64px;
+ width : 96px;
}
}
diff --git a/js/read.js b/js/read.js
index 469ccf5..1feb032 100644
--- a/js/read.js
+++ b/js/read.js
@@ -1,11 +1,9 @@
'use strict';
var _store_position = 0;
-var _enable_fullscreen = 0;
function request_fullscreen() {
- if (_enable_fullscreen)
- document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
+ document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
}
function disable_fullscreen() {
diff --git a/js/reader.js b/js/reader.js
index 89c3de1..edb9434 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -4,15 +4,11 @@ function enable_swipes() {
$(window).off("swipeleft swiperight");
$(window).on("swipeleft", function() {
- parent.show_ui(false);
- parent.request_fullscreen();
- parent.book.rendition.next();
+ parent.prev_page();
});
$(window).on("swiperight", function() {
- parent.show_ui(false);
- parent.request_fullscreen();
- parent.book.rendition.prev();
+ parent.next_page();
});
}
@@ -22,7 +18,6 @@ $(document).ready(function() {
$(window).on("click tap", function() {
if (parent.$(".header").is(":visible")) {
parent.show_ui(false);
- parent.request_fullscreen();
} else {
parent.show_ui(true);
parent.disable_fullscreen();
diff --git a/read.html b/read.html
index 8c81f42..d7533a5 100644
--- a/read.html
+++ b/read.html
@@ -72,7 +72,7 @@
</div>
</div>
- <div class="form-group">
+ <!-- <div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-9">
<div class="text-muted">Options take effect after reload:</div>
@@ -90,7 +90,7 @@
</label>
</div>
</div>
- </div>
+ </div> -->
<hr/>
@@ -202,6 +202,10 @@
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
</button> -->
+ <button class="btn btn-default btn-xs" onclick="request_fullscreen()">
+ <span class="glyphicon glyphicon-fullscreen" aria-hidden="true"></span>
+ </button>
+
<button class="btn btn-default btn-xs"
data-toggle="modal" data-target="#settings-modal">
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
@@ -409,10 +413,6 @@
}
});
- localforage.getItem("epube.enable-fullscreen").then(function(enable) {
- _enable_fullscreen = enable;
- });
-
var book = ePub({
restore: false,
minSpreadWidth: 961,
@@ -478,7 +478,7 @@
.append($("<style type='text/css'>")
.text(_res_data[base_url + 'css/reader.css']));
- localforage.getItem("epube.disable-transitions").then(function(notransitions) {
+ /*localforage.getItem("epube.disable-transitions").then(function(notransitions) {
if (!notransitions) {
$(contents.document.head)
.append($("<style type='text/css'>")
@@ -486,13 +486,13 @@
// TODO: fix transitions somehow
- /*EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
+ EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){
this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)';
- }*/
+ }
}
- });
+ }); */
- localforage.getItem("epube.theme").then(function(theme) {
+ return localforage.getItem("epube.theme").then(function(theme) {
if (!theme) theme = 'default';
@@ -519,14 +519,6 @@
});
});
- localforage.getItem("epube.enable-fullscreen").then(function(enable) {
- $(".fullscreen_checkbox")
- .attr("checked", enable)
- .on("click", function() {
- localforage.setItem("epube.enable-fullscreen", this.checked);
- });
- });
-
localforage.getItem("epube.fontFamily").then(function(font) {
if (!font) font = DEFAULT_FONT_FAMILY;