Update check
This commit is contained in:
parent
485f9077f5
commit
a8961dee86
5
Web/cache.appcache
Normal file
5
Web/cache.appcache
Normal file
@ -0,0 +1,5 @@
|
||||
CACHE MANIFEST
|
||||
|
||||
index.html
|
||||
js/
|
||||
css/
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html manifest='cache.appcache'>
|
||||
|
||||
<head>
|
||||
<title>Sketchy</title>
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user