mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-17 05:40:00 +01:00
Update sw.js
This commit is contained in:
committed by
GitHub
parent
077d85bbb5
commit
508d1d8f71
@@ -1,4 +1,12 @@
|
|||||||
const staticCacheName = 'image-sequencer-static-v3';
|
const request = new XMLHttpRequest();
|
||||||
|
request.open("GET", "../manifest.json", false);
|
||||||
|
request.send(null);
|
||||||
|
const meta = JSON.parse(request.responseText).metadata,
|
||||||
|
ver = meta.version,
|
||||||
|
betaVer = meta.betaVersion;
|
||||||
|
const version = (window.location.indexOf('beta') == 0) ? betaVer : ver;
|
||||||
|
|
||||||
|
const staticCacheName = `image-sequencer-static-v${version}`;
|
||||||
|
|
||||||
self.addEventListener('install', event => {
|
self.addEventListener('install', event => {
|
||||||
console.log('Attempting to install service worker');
|
console.log('Attempting to install service worker');
|
||||||
|
|||||||
Reference in New Issue
Block a user