From fd5e4afe5445d85c7da16576b9e5d9941d17ffe2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 26 Feb 2018 13:32:48 +0300 Subject: Revert "exp workaround: enable swipes after first touch event" This reverts commit 82e821c5b5495b8c9fc1e15cb11e3bbd5438eb36. --- js/reader.js | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'js/reader.js') diff --git a/js/reader.js b/js/reader.js index 108f1a4..453c925 100644 --- a/js/reader.js +++ b/js/reader.js @@ -1,19 +1,5 @@ -function setup_swipes() { - $(window).off("swipeleft swiperight"); - - if (parent._has_touch) { - $(window).on("swiperight", function() { - parent.prev_page(); - }); - - $(window).on("swipeleft", function() { - parent.next_page(); - }); - } -} - $(document).ready(function() { - $(window).on("click", function() { + $(window).on("click tap", function() { if (parent.$(".header").is(":visible")) { parent.show_ui(false); parent.request_fullscreen(); @@ -22,14 +8,5 @@ $(document).ready(function() { parent.disable_fullscreen(); } }); - - $(window).on('touchstart', function touch_detect() { - $(window).off('touchstart', touch_detect); - - parent._has_touch = true; - setup_swipes(); - }); - - setup_swipes(); }); -- cgit v1.2.3