Update manager

This commit is contained in:
Mahdi Dibaiee 2014-02-10 14:50:58 +03:30
parent ca326e2625
commit 7efebcd18e
3 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
CACHE MANIFEST
# v1
index.html
js
css

View File

@ -99,6 +99,8 @@ $(document).ready(function() {
latest.onload = function() {
if( this.response ) {
var lapp = JSON.parse(this.response);
alert(lapp.version);
alert(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');

View File