mirror of
https://github.com/marcrobledo/RomPatcher.js.git
synced 2025-06-27 16:25:54 +00:00
PWA fix attempt 4b
This commit is contained in:
parent
1381ac34fb
commit
a23fdbec00
2 changed files with 2 additions and 4 deletions
|
@ -30,7 +30,7 @@ caches.keys().then(function(cacheNames){
|
||||||
});
|
});
|
||||||
|
|
||||||
var PRECACHE_ID='rom-patcher-js';
|
var PRECACHE_ID='rom-patcher-js';
|
||||||
var PRECACHE_VERSION='v1';
|
var PRECACHE_VERSION='v2';
|
||||||
var PRECACHE_URLS=[
|
var PRECACHE_URLS=[
|
||||||
'/RomPatcher.js/','/RomPatcher.js/index.html',
|
'/RomPatcher.js/','/RomPatcher.js/index.html',
|
||||||
'/RomPatcher.js/manifest.json',
|
'/RomPatcher.js/manifest.json',
|
||||||
|
@ -87,10 +87,8 @@ self.addEventListener('fetch', evt => {
|
||||||
evt.respondWith(
|
evt.respondWith(
|
||||||
caches.match(evt.request).then(cachedResource => {
|
caches.match(evt.request).then(cachedResource => {
|
||||||
if (cachedResource) {
|
if (cachedResource) {
|
||||||
console.log('retrieving cached resource: '+cachedResource);
|
|
||||||
return cachedResource;
|
return cachedResource;
|
||||||
}else{
|
}else{
|
||||||
console.log('FAILED retrieving cached resource: '+evt.request);
|
|
||||||
return fetch(evt.request);
|
return fetch(evt.request);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
<!-- FOOTER -->
|
<!-- FOOTER -->
|
||||||
<footer>
|
<footer>
|
||||||
Rom Patcher JS <small>v2.0 RC1c</small> by <a href="/">Marc Robledo</a>
|
Rom Patcher JS <small>v2.0 RC1d</small> by <a href="/">Marc Robledo</a>
|
||||||
<br />
|
<br />
|
||||||
<i class="icon github"></i> <a href="https://github.com/marcrobledo/RomPatcher.js/" target="_blank">See on GitHub</a>
|
<i class="icon github"></i> <a href="https://github.com/marcrobledo/RomPatcher.js/" target="_blank">See on GitHub</a>
|
||||||
<i class="icon heart"></i> <a href="https://www.paypal.me/marcrobledo/5" target="_blank" rel="nofollow">Donate</a>
|
<i class="icon heart"></i> <a href="https://www.paypal.me/marcrobledo/5" target="_blank" rel="nofollow">Donate</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue