10 changed files with 38 additions and 71 deletions
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 529 B |
@ -1,27 +1,31 @@ |
|||||||
<!doctype html><html lang=en ng-app=myApp manifest=app.manifest><head><meta charset=utf-8><meta name=viewport content="width=device-width, user-scalable=no"><title>Webogram</title><link rel=stylesheet href=css/app.css><link rel=icon href=favicon.ico type=image/x-icon><meta property=og:title content=Webogram><meta property=og:url content="http://zhukov.github.io/webogram/"><meta property=og:image content=http://zhukov.github.io/webogram/img/logo_share.png><meta property=og:site_name content=Webogram><meta property=og:description content="Welcome to an experimental web-client of Telegram messenger. See https://github.com/zhukov/webogram for more info."></head><body><div ng-view=""></div><script src=js/app-ee353437.js></script><script type=text/javascript>(function () { |
<!doctype html><html lang=en ng-app=myApp manifest=app.manifest><head><meta charset=utf-8><meta name=viewport content="width=device-width, user-scalable=no"><title>Webogram</title><link rel=stylesheet href=css/app.css><link rel=icon href=favicon.ico type=image/x-icon><meta property=og:title content=Webogram><meta property=og:url content="http://zhukov.github.io/webogram/"><meta property=og:image content=http://zhukov.github.io/webogram/img/logo_share.png><meta property=og:site_name content=Webogram><meta property=og:description content="Welcome to an experimental web-client of Telegram messenger. See https://github.com/zhukov/webogram for more info."><script type=text/javascript>(function () { |
||||||
if (!window.applicationCache || !window.addEventListener) { |
if (!window.applicationCache || !window.addEventListener) { |
||||||
return; |
return; |
||||||
} |
} |
||||||
var appCache = window.applicationCache, |
var appCache = window.applicationCache, |
||||||
canceled = false, |
declined = false, |
||||||
scheduleUpdate = function () { |
updateTimeout = false, |
||||||
setTimeout(function () { |
scheduleUpdate = function (delay) { |
||||||
|
clearTimeout(updateTimeout); |
||||||
|
updateTimeout = setTimeout(function () { |
||||||
appCache.update(); |
appCache.update(); |
||||||
}, 300000); |
}, delay || 300000); |
||||||
}; |
}, |
||||||
|
attach = function () { |
||||||
window.addEventListener('load', function(e) { |
|
||||||
appCache.addEventListener('updateready', function(e) { |
appCache.addEventListener('updateready', function(e) { |
||||||
if (appCache.status == appCache.UPDATEREADY) { |
if (appCache.status == appCache.UPDATEREADY) { |
||||||
if (!canceled && confirm('A new version of Webogram is available. Load it?')) { |
if (!declined && confirm('A new version of Webogram is available. Load it?')) { |
||||||
window.location.reload(); |
window.location.reload(); |
||||||
} else { |
} else { |
||||||
canceled = true; |
declined = true; |
||||||
scheduleUpdate(); |
scheduleUpdate(); |
||||||
} |
} |
||||||
} |
} |
||||||
}, false); |
}, false); |
||||||
appCache.addEventListener('noupdate', scheduleUpdate, false); |
appCache.addEventListener('noupdate', function () {scheduleUpdate()}, false); |
||||||
appCache.addEventListener('error', scheduleUpdate, false); |
appCache.addEventListener('error', function () {scheduleUpdate()}, false); |
||||||
}); |
}; |
||||||
})();</script></body></html> |
|
||||||
|
scheduleUpdate(3000); |
||||||
|
window.addEventListener('load', attach); |
||||||
|
})();</script></head><body><div ng-view=""></div><script src=js/app.js></script></body></html> |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue