diff options
author | Andrew Dolgov <[email protected]> | 2020-09-13 18:25:59 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-13 18:25:59 +0300 |
commit | 14d6b632fda15a01bd237ec849d0841af836ee40 (patch) | |
tree | 2f1eb13b8fabb4a80601348cbe6d621f739cd89c /js | |
parent | b250050acdc311c975ecf410408e94516e05932b (diff) |
add helper method for app to check offline status
Diffstat (limited to 'js')
-rw-r--r-- | js/app.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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() {
|