- manifest.webmanifest with name, standalone display, theme color - PNG icons 192/512 + maskable variant + apple-touch-icon (from the Poké Ball favicon) - minimal pass-through service worker (installability requirement) - apple/mobile web app meta tags
17 lines
456 B
JavaScript
17 lines
456 B
JavaScript
/**
|
|
* Minimal service worker — network pass-through.
|
|
* Its only job is to make the app installable (browsers require a service
|
|
* worker to offer "Install app"); no offline caching for now.
|
|
*/
|
|
self.addEventListener("install", (event) => {
|
|
self.skipWaiting();
|
|
});
|
|
|
|
self.addEventListener("activate", (event) => {
|
|
event.waitUntil(clients.claim());
|
|
});
|
|
|
|
self.addEventListener("fetch", (event) => {
|
|
event.respondWith(fetch(event.request));
|
|
});
|