diff options
author | Andrew Dolgov <[email protected]> | 2019-06-18 14:19:03 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-06-18 14:19:03 +0300 |
commit | c78af7d56c4d2dbc46ffa1ebebc6d0bbf802e35b (patch) | |
tree | 2a05a6248b0af7f93a3bacaf18cca071e5e945be /js | |
parent | 506a5a877ead4e4e756b645d3e0a303509ea10ec (diff) |
switch to jquery mobile events; use doubletap to toggle fullscreen
Diffstat (limited to 'js')
-rw-r--r-- | js/read.js | 4 | ||||
-rw-r--r-- | js/reader.js | 5 |
2 files changed, 7 insertions, 2 deletions
@@ -20,7 +20,7 @@ function cacheId(suffix) { function init_loader() { // we need to preload resources for reader iframe because it can't utilize our // service worker because while offline it is created outside our base server context - const res_names = [ "lib/bootstrap/v3/js/jquery.js", "lib/jquery.mobile.custom.js", + const res_names = [ "lib/bootstrap/v3/js/jquery.js", "lib/jquery.mobile-events.min.js", "css/transitions.css", "js/reader.js", "css/reader.css", "js/dict.js", "themes/default.css", "themes/mocca.css", "themes/night.css", @@ -241,7 +241,7 @@ function init_reader() { }); const base_url = window.location.href.match(/^.*\//)[0]; - const res_names = [ "lib/bootstrap/v3/js/jquery.js", "lib/jquery.mobile.custom.js", + const res_names = [ "lib/bootstrap/v3/js/jquery.js", "lib/jquery.mobile-events.min.js", "js/reader.js", "js/dict.js" ]; const doc = contents.document; diff --git a/js/reader.js b/js/reader.js index 7178aec..bc4db56 100644 --- a/js/reader.js +++ b/js/reader.js @@ -13,6 +13,11 @@ function enable_swipes() { } $(document).ready(function() { + + $(window).on("doubletap", function(evt) { + parent.toggle_fullscreen(); + }); + $(window).on("click tap", function(evt) { if (evt.button == 0) { |