-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcache.js
3 lines (2 loc) · 1.22 KB
/
cache.js
1
2
3
protobowl_cache_build = 'Tue Mar 09 2021 11:13:19 GMT-0800 (Pacific Standard Time)';
var cache_error,cache_event,cache_status,name,_i,_len,_ref;if(cache_status=function(t){return document.getElementById("cache_status").innerHTML=t,window.parent.postMessage("CacheStatus:"+t,"*")},cache_event=function(){var t;switch(t=applicationCache.status,applicationCache.status){case applicationCache.UPDATEREADY:return cache_status("Updated"),applicationCache.swapCache();case applicationCache.UNCACHED:return cache_status("Uncached");case applicationCache.OBSOLETE:return cache_status("Obsolete");case applicationCache.IDLE:return cache_status("Cached");case applicationCache.DOWNLOADING:return cache_status("Downloading");case applicationCache.CHECKING:return cache_status("Checking")}},cache_error=function(){return window.parent.postMessage("CacheStatus:Error","*")},window.applicationCache){for(_ref=["cached","checking","downloading","noupdate","obsolete","progress","updateready"],_i=0,_len=_ref.length;_len>_i;_i++)name=_ref[_i],applicationCache.addEventListener(name,cache_event,!1);applicationCache.addEventListener("error",cache_error,!1),window.addEventListener("message",function(t){return"CacheUpdate"===t.data?applicationCache.update():void 0},!1)}