Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-04-13 17:48:51 +03:00
parent e46a555705
commit 3ac881c3aa
2 changed files with 10 additions and 1 deletions

View File

@ -2,6 +2,6 @@ CACHE MANIFEST
# Last Modified: 2017 Apr 13
CACHE:
simplesnake.html
simplesnake.css
simplesnake.js
simplesnake.html

View File

@ -375,6 +375,15 @@ function setup(snake, timer, size){
//document.addEventListener('touchstart', makeTapHandler(snake))
document.addEventListener('mousedown', makeTapHandler(snake))
HANDLER_SET = true
if(window.applicationCache){
applicationCache.update()
if(applicationCache.status == applicationCache.UPDATEREADY){
console.log('NEW VERSION')
applicationCache.swapCache()
}
}
}
return snake