Install Request
This commit is contained in:
parent
8371a02975
commit
eec54ed388
@ -12,7 +12,6 @@ function sizeAndPos() {
|
|||||||
'width' : w,
|
'width' : w,
|
||||||
'height' : h
|
'height' : h
|
||||||
});
|
});
|
||||||
$('body, html').css('height', h+53)
|
|
||||||
c.clearRect(0,0, width(), height());
|
c.clearRect(0,0, width(), height());
|
||||||
c.putImageData(data, 0, 0);
|
c.putImageData(data, 0, 0);
|
||||||
}
|
}
|
||||||
|
0
Web/js/main.css
Normal file
0
Web/js/main.css
Normal file
@ -89,12 +89,12 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
// TODO: Check for Update
|
// TODO: Check for Update
|
||||||
|
|
||||||
/*var request = navigator.mozApps.getInstalled();
|
var request = navigator.mozApps.getInstalled();
|
||||||
request.onsuccess = function() {
|
request.onsuccess = function() {
|
||||||
var app = this.result[0];
|
var app = this.result[0];
|
||||||
var latest = $.ajax({url:'manifest-web.webapp'});
|
var latest = $.ajax({url:'manifest-web.webapp'});
|
||||||
var selfApp = navigator.mozApps.getSelf();
|
var selfApp = navigator.mozApps.getSelf();
|
||||||
selfApp.onsuccess = function() {
|
/*selfApp.onsuccess = function() {
|
||||||
if(this.result) {
|
if(this.result) {
|
||||||
latest.onload = function() {
|
latest.onload = function() {
|
||||||
if( this.response ) {
|
if( this.response ) {
|
||||||
@ -114,7 +114,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if( !app && confirm('Do you want to Install this app?') ) {
|
if( !app && confirm('Do you want to Install this app?') ) {
|
||||||
var ins = navigator.mozApps.install('http://mdibaiee.github.io/Sketchy/Web/manifest-web.webapp');
|
var ins = navigator.mozApps.install('http://mdibaiee.github.io/Sketchy/Web/manifest-web.webapp');
|
||||||
ins.onsuccess = function() {
|
ins.onsuccess = function() {
|
||||||
@ -128,7 +128,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
request.onerror = function() {
|
request.onerror = function() {
|
||||||
alert('An error occured while trying to check for updates');
|
alert('An error occured while trying to check for updates');
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user