From 96b4b5f3964ac3193c5d7c2b2857601db785801e Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sun, 9 Feb 2014 21:46:03 +0330 Subject: [PATCH] Update check --- Web/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/js/main.js b/Web/js/main.js index 7ef22de..19142a4 100644 --- a/Web/js/main.js +++ b/Web/js/main.js @@ -99,8 +99,8 @@ $(document).ready(function() { console.log(lapp.version); console.log(app.manifest.version); if( lapp.version != app.manifest.version && - confirm('A new version of this app is available, do you want to update?')) { - var ins = navigator.mozApps.install('http://mdibaiee.github.io/Sketchy/Web/manifest-web.webapp'); + confirm('A new version of this app is available, do you want to update? ' + app.manifest.version + ' to ' + lapp.version )) { + var ins = app.install('http://mdibaiee.github.io/Sketchy/Web/manifest-web.webapp'); ins.onsuccess = function() { alert('The app was installed successfuly'); }