summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/reader.js10
-rw-r--r--read.html8
2 files changed, 9 insertions, 9 deletions
diff --git a/js/reader.js b/js/reader.js
index d7eddbe..d3614aa 100644
--- a/js/reader.js
+++ b/js/reader.js
@@ -13,7 +13,7 @@ function enable_swipes() {
}
$(document).ready(function() {
- $(window).on("mouseup", function(evt) {
+ $(window).on("click tap", function(evt) {
if (evt.button == 0) {
if ($(".modal").is(":visible"))
@@ -35,6 +35,14 @@ $(document).ready(function() {
$(window).off("swipeleft swiperight");
});
+ $(window).on("wheel", function(evt) {
+ if (evt.originalEvent.deltaY > 0) {
+ parent.next_page();
+ } else if (evt.originalEvent.deltaY < 0) {
+ parent.prev_page();
+ }
+ });
+
enable_swipes();
});
diff --git a/read.html b/read.html
index 3bfa448..3a67b19 100644
--- a/read.html
+++ b/read.html
@@ -431,14 +431,6 @@
rendition.hooks.content.register(function(contents) {
- $("#reader iframe")[0].contentWindow.onwheel = function(event) {
- if (event.deltaY > 0) {
- next_page();
- } else if (event.deltaY < 0) {
- prev_page();
- }
- };
-
var base_url = window.location.href.match(/^.*\//)[0];
var res_names = [ "lib/bootstrap/v3/js/jquery.js", "lib/jquery.mobile.custom.js",
"js/reader.js", "js/dict.js" ];