From 0a6a76b07644f38b2599a6bb0c462e82cdecbf8a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 20 Jan 2016 23:04:19 +0100 Subject: build --- StoneIsland/www/js/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'StoneIsland/www/js/index.js') diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 0770b0f6..4f1747ab 100755 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -3,7 +3,7 @@ var app = (function(){ app.init = function(){ - sdk.init({ env: "test" }) + sdk.init({ env: "production" }) app.bind() app.build() @@ -66,6 +66,8 @@ var app = (function(){ if (window.cordova) { document.addEventListener('pause', app.paused, false) document.addEventListener('resume', app.resumed, false) + document.addEventListener('online', app.online, false) + document.addEventListener('offline', app.offline, false) cordova.plugins.Keyboard.disableScroll(true) geo.fetch() } @@ -92,6 +94,13 @@ var app = (function(){ } } + app.online = function(){ + console.log(">> ONLINE") + } + app.offline = function(){ + console.log(">> OFFLINE") + } + return app })() -- cgit v1.2.3-70-g09d2