Install Request

This commit is contained in:
Mahdi Dibaiee 2014-02-10 16:57:01 +03:30
parent 8371a02975
commit eec54ed388
3 changed files with 4 additions and 5 deletions

View File

@ -12,7 +12,6 @@ function sizeAndPos() {
'width' : w,
'height' : h
});
$('body, html').css('height', h+53)
c.clearRect(0,0, width(), height());
c.putImageData(data, 0, 0);
}

0
Web/js/main.css Normal file
View File

View File

@ -89,12 +89,12 @@ $(document).ready(function() {
// TODO: Check for Update
/*var request = navigator.mozApps.getInstalled();
var request = navigator.mozApps.getInstalled();
request.onsuccess = function() {
var app = this.result[0];
var latest = $.ajax({url:'manifest-web.webapp'});
var selfApp = navigator.mozApps.getSelf();
selfApp.onsuccess = function() {
/*selfApp.onsuccess = function() {
if(this.result) {
latest.onload = function() {
if( this.response ) {
@ -114,7 +114,7 @@ $(document).ready(function() {
}
}
}
}
}*/
if( !app && confirm('Do you want to Install this app?') ) {
var ins = navigator.mozApps.install('http://mdibaiee.github.io/Sketchy/Web/manifest-web.webapp');
ins.onsuccess = function() {
@ -128,7 +128,7 @@ $(document).ready(function() {
}
request.onerror = function() {
alert('An error occured while trying to check for updates');
}*/
}