summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-13 18:25:59 +0300
committerAndrew Dolgov <[email protected]>2020-09-13 18:25:59 +0300
commit14d6b632fda15a01bd237ec849d0841af836ee40 (patch)
tree2f1eb13b8fabb4a80601348cbe6d621f739cd89c /js
parentb250050acdc311c975ecf410408e94516e05932b (diff)
add helper method for app to check offline status
Diffstat (limited to 'js')
-rw-r--r--js/app.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/app.js b/js/app.js
index 1816095..4f5631e 100644
--- a/js/app.js
+++ b/js/app.js
@@ -197,6 +197,9 @@ const App = {
.html("Could not communicate with service worker. Try reloading the page.");
}
},
+ appCheckOffline: function() {
+ EpubeApp.setOffline(!navigator.onLine);
+ },
initOfflineEvents: function() {
if (typeof EpubeApp != "undefined") {
$(window).on('online', function() {