🎨 format
This commit is contained in:
+13
-13
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"short_name": "Quadruped Controller",
|
||||
"name": "Quadruped Controller",
|
||||
"icons": [
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
"short_name": "Quadruped Controller",
|
||||
"name": "Quadruped Controller",
|
||||
"icons": [
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
|
||||
+23
-23
@@ -1,13 +1,13 @@
|
||||
const CACHE_NAME = 'v1';
|
||||
const urlsToCache = ['/', '/index.html', '/stl.zip'];
|
||||
const CACHE_NAME = 'v1'
|
||||
const urlsToCache = ['/', '/index.html', '/stl.zip']
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME).then((cache) => {
|
||||
return cache.addAll(urlsToCache);
|
||||
})
|
||||
);
|
||||
});
|
||||
self.addEventListener('install', event => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME).then(cache => {
|
||||
return cache.addAll(urlsToCache)
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
// self.addEventListener('fetch', (event) => {
|
||||
// event.respondWith(
|
||||
@@ -29,17 +29,17 @@ self.addEventListener('install', (event) => {
|
||||
// );
|
||||
// });
|
||||
|
||||
self.addEventListener('activate', (event) => {
|
||||
var cacheWhitelist = ['v1'];
|
||||
event.waitUntil(
|
||||
caches.keys().then((cacheNames) => {
|
||||
return Promise.all(
|
||||
cacheNames.map((cacheName) => {
|
||||
if (cacheWhitelist.indexOf(cacheName) === -1) {
|
||||
return caches.delete(cacheName);
|
||||
}
|
||||
})
|
||||
);
|
||||
})
|
||||
);
|
||||
});
|
||||
self.addEventListener('activate', event => {
|
||||
var cacheWhitelist = ['v1']
|
||||
event.waitUntil(
|
||||
caches.keys().then(cacheNames => {
|
||||
return Promise.all(
|
||||
cacheNames.map(cacheName => {
|
||||
if (cacheWhitelist.indexOf(cacheName) === -1) {
|
||||
return caches.delete(cacheName)
|
||||
}
|
||||
})
|
||||
)
|
||||
})
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user