mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
15 lines
337 B
JavaScript
15 lines
337 B
JavaScript
define([], function() {
|
|
var isAvailable = (typeof applicationCache !== "undefined");
|
|
|
|
var init = function() {
|
|
if (!isAvailable) return;
|
|
|
|
window.applicationCache.addEventListener('updateready', function() {
|
|
window.location.reload();
|
|
}, false);
|
|
};
|
|
|
|
return {
|
|
init: init
|
|
};
|
|
}); |