From a8961dee864bf25573e46662b16b9ac100c4b697 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sun, 9 Feb 2014 19:41:39 +0330 Subject: [PATCH] Update check --- Web/cache.appcache | 5 +++++ Web/index.html | 2 +- Web/js/main.js | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 Web/cache.appcache diff --git a/Web/cache.appcache b/Web/cache.appcache new file mode 100644 index 0000000..9574394 --- /dev/null +++ b/Web/cache.appcache @@ -0,0 +1,5 @@ +CACHE MANIFEST + +index.html +js/ +css/ diff --git a/Web/index.html b/Web/index.html index 1dee6ad..818b784 100644 --- a/Web/index.html +++ b/Web/index.html @@ -1,5 +1,5 @@ - + Sketchy diff --git a/Web/js/main.js b/Web/js/main.js index 3a00212..7efd1a2 100644 --- a/Web/js/main.js +++ b/Web/js/main.js @@ -92,7 +92,13 @@ $(document).ready(function() { var request = navigator.mozApps.checkInstalled('mdibaiee.github.io/Sketchy/Web/manifest-web.webapp'); request.onsuccess = function() { if( !this.result && confirm('A new version is available, do you want to update?') ) { - navigator.mozApps.install('mdibaiee.github.io/Sketchy/Web/manifest-web.webapp'); + var ins = navigator.mozApps.install('mdibaiee.github.io/Sketchy/Web/manifest-web.webapp'); + ins.onsuccess = function() { + alert('The app was installed successfuly'); + } + ins.onerror = function() { + alert('There was an error installing app') + } } } request.onerror = function() {