From edbc49b9b7ad9dd4323db4a0e4ed0a7907871dd6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 2 Jul 2018 12:31:52 +0300 Subject: add option to keep UI when turning pages, remove terrible iframe onclick hack --- js/reader.js | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'js/reader.js') diff --git a/js/reader.js b/js/reader.js index ae96a26..d7eddbe 100644 --- a/js/reader.js +++ b/js/reader.js @@ -13,31 +13,16 @@ function enable_swipes() { } $(document).ready(function() { - console.log('setting taps'); - $(window).on("mouseup", function(evt) { if (evt.button == 0) { if ($(".modal").is(":visible")) return; - var reader = $("body"); - var margin_side = parseInt(reader.css("padding-left"), 10); - - //console.log(evt, evt.screenX); - - if (evt.screenX >= reader.width() - margin_side) { - console.log("iframe: RIGHT SIDE"); - parent.next_page(); - } else if (evt.screenX <= margin_side) { - console.log("iframe: LEFT SIDE"); - parent.prev_page(); + if (parent.$(".header").is(":visible")) { + parent.show_ui(false); } else { - if (parent.$(".header").is(":visible")) { - parent.show_ui(false); - } else { - parent.show_ui(true); - } + parent.show_ui(true); } } }); -- cgit v1.2.3