From 4ee6e3f05ff534df646ed2c9169002cae615b1bc Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 20 Oct 2020 16:33:39 +0200 Subject: window cordova --- StoneIsland/www/js/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'StoneIsland/www') diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 0e9ee355..8b6d2914 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -115,7 +115,9 @@ var app = (function(){ // } push.init() - window.open = cordova.InAppBrowser.open + if (window.cordova) { + window.open = cordova.InAppBrowser.open + } if (navigator.onLine) { app.account.connect(window.deepLinkRoute || '/intro') @@ -150,11 +152,11 @@ var app = (function(){ var refresh_time = +Date.now() app.paused = function(){} app.resumed = function(){ - console.log( "app is ready?", app.is_ready ) + console.log("app resumed") geo.fetch() var now = +Date.now() - if (now - refresh_time > 60 * 60 * 1000) { + if (now - refresh_time > 60 * 1000) { refresh_time = now app.blog.refresh() } -- cgit v1.2.3-70-g09d2