- Service worker, manifest, and SVG icon for PWA installability - Root /sw.js route for full-scope service worker registration - Meta tags: theme-color, apple-mobile-web-app, viewport-fit=cover - Safe area insets for notched phones (container, mini-player, footer, banner) - Dynamic theme-color sync on light/dark toggle - Overscroll prevention and touch-action optimization - Hide mini-player prev/next buttons on small screens - Updated README with PWA and new feature documentation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
450 B
JavaScript
16 lines
450 B
JavaScript
// Minimal service worker for PWA installability.
|
|
// This app requires a live WebSocket connection, so offline caching is not useful.
|
|
// All fetch requests are passed through to the network.
|
|
|
|
self.addEventListener('install', () => {
|
|
self.skipWaiting();
|
|
});
|
|
|
|
self.addEventListener('activate', (event) => {
|
|
event.waitUntil(self.clients.claim());
|
|
});
|
|
|
|
self.addEventListener('fetch', (event) => {
|
|
event.respondWith(fetch(event.request));
|
|
});
|