summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-02-26 13:32:48 +0300
committerAndrew Dolgov <[email protected]>2018-02-26 13:32:48 +0300
commitfd5e4afe5445d85c7da16576b9e5d9941d17ffe2 (patch)
tree2c3f98cad809c67b7242892a60f090c13b6da229 /js
parent82e821c5b5495b8c9fc1e15cb11e3bbd5438eb36 (diff)
Revert "exp workaround: enable swipes after first touch event"
This reverts commit 82e821c5b5495b8c9fc1e15cb11e3bbd5438eb36.
Diffstat (limited to 'js')
-rw-r--r--js/read.js2
-rw-r--r--js/reader.js25
2 files changed, 1 insertions, 26 deletions
diff --git a/js/read.js b/js/read.js
index 1965504..295a530 100644
--- a/js/read.js
+++ b/js/read.js
@@ -1,6 +1,5 @@
var _store_position = 0;
var _enable_fullscreen = 0;
-var _has_touch = 0;
function request_fullscreen() {
if (_enable_fullscreen)
@@ -101,7 +100,6 @@ $(document).ready(function() {
}
}
});
-
});
function apply_line_height(elem) {
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();
});