diff options
author | Andrew Dolgov <[email protected]> | 2018-06-29 16:35:02 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-06-29 16:35:02 +0300 |
commit | f1aa90fa6c4599107cee9149220da617b66b527e (patch) | |
tree | ca4c324757cc378da58ae8c1aad682f56709b7f7 /js | |
parent | 84fef6ce365385f71e325d63c12fe4101b352226 (diff) |
add button to enter fullscreen; disable transitions for now
Diffstat (limited to 'js')
-rw-r--r-- | js/read.js | 4 | ||||
-rw-r--r-- | js/reader.js | 9 |
2 files changed, 3 insertions, 10 deletions
@@ -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(); |