diff options
author | Andrew Dolgov <[email protected]> | 2020-11-19 07:59:26 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-11-19 07:59:26 +0300 |
commit | 94e0592f456880e72a8d8114db80e2288958c638 (patch) | |
tree | 4055fcd6609ec1f609a595c3807437e08703185a /js/reader_iframe.js | |
parent | 521a040b7a460688675f1d5c0eac46bfe1a24883 (diff) |
WIP: check online status via app if possible
Diffstat (limited to 'js/reader_iframe.js')
-rw-r--r-- | js/reader_iframe.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/reader_iframe.js b/js/reader_iframe.js index 897be44..80e597e 100644 --- a/js/reader_iframe.js +++ b/js/reader_iframe.js @@ -3,6 +3,7 @@ /* global EpubeApp */ let Reader; +let App; function enable_swipes() { $(window).off("swipeleft swiperight"); @@ -18,6 +19,7 @@ function enable_swipes() { $(document).ready(function() { Reader = parent.__get_reader(); + App = parent.__get_app(); $(window).on("doubletap", function(/* evt */) { const sel = getSelection().toString().trim(); @@ -57,7 +59,7 @@ $(document).ready(function() { }); $(window).on("mouseup touchend", function() { - if (!navigator.onLine) return; + if (!App.onLine) return; const sel = getSelection().toString().trim(); |