diff options
author | Andrew Dolgov <[email protected]> | 2018-01-25 19:43:46 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-01-25 19:43:46 +0300 |
commit | 526a841ef5c28d2bdc4a79cb4bde3c9304a76dad (patch) | |
tree | 687927f0de92d9ecebc1b1d607e877ebc844aa15 | |
parent | 5d82b0dffa2b8328515540658e4fdf3478ec7dfd (diff) |
minor fullscreen fix
-rw-r--r-- | js/read.js | 4 | ||||
-rw-r--r-- | js/swipes.js | 5 | ||||
-rw-r--r-- | read.html | 2 |
3 files changed, 8 insertions, 3 deletions
@@ -6,6 +6,10 @@ function request_fullscreen() { document.documentElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); } +function disable_fullscreen() { + document.webkitExitFullscreen(); +} + function show_ui(show) { if (show) $(".header,.footer").fadeIn(); diff --git a/js/swipes.js b/js/swipes.js index 4c5e369..2d60076 100644 --- a/js/swipes.js +++ b/js/swipes.js @@ -1,5 +1,6 @@ -$(window).on("click", function() { - parent.toggle_ui(); +$(window).on("click tap", function() { + parent.show_ui(true); + parent.disable_fullscreen(); }); $(window).on("swipeleft", function() { @@ -355,7 +355,7 @@ document.onkeydown = hotkey_handler; localforage.getItem("epube.enable-fullscreen").then(function(enable) { - _enable_fullscreen = 1; + _enable_fullscreen = enable; }); EPUBJS.Hooks.register("beforeChapterDisplay").swipeDetection = function(callback, renderer) { |