Rename fr_windows_8.1_pro_wmc_ir5_x86_dvd.iso.001 to VirtualXP.iso #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const filesToCache = [ | ||
"VirtualXP.htm", | ||
"VirtualXP.iso", | ||
"VirtualXP.js", | ||
"VirtualXP.json", | ||
"VirtualXP.png", | ||
"VirtualXP.wasm", | ||
"VirtualXPBIOS.bin", | ||
"VirtualXPFavIcon_16x16.png", | ||
"VirtualXPFavIcon_192x192.png", | ||
"VirtualXPFavIcon_512x512.png", | ||
"VirtualXPLoader.js", | ||
"VirtualXPShare.png", | ||
"VirtualXPVGA.bin" | ||
]; | ||
const staticCacheName = "virtualxp-v1"; | ||
self.addEventListener("install", event => { | ||
event.waitUntil( | ||
caches.open(staticCacheName) | ||
.then(cache => { | ||
return cache.addAll(filesToCache); | ||
}) | ||
); | ||
}); | ||
self.addEventListener("fetch", event => { | ||
event.respondWith( | ||
caches.match(event.request) | ||
.then(response => { | ||
if (response) { | ||
return response; | ||
} | ||
return fetch(event.request) | ||
}).catch(error => { | ||
}) | ||
); | ||
}); |