Add shared synced lyrics, chapters and personal bookmarks with revision history, API tokens and an admin page

This commit is contained in:
Jonathan Sykes
2026-09-18 18:10:10 +08:00
parent a20dd0a3a6
commit 524db986d2
14 changed files with 2493 additions and 11 deletions

View File

@@ -61,6 +61,8 @@ const SHELL = [
'/fingerprint.js',
'/opfs.js',
'/opfs-worker.js',
'/video-edit.js',
'/lyrics-core.js',
'/app.js',
'/manifest.webmanifest',
'/icons/icon-192.png',
@@ -143,6 +145,9 @@ self.addEventListener('fetch', (e) => {
// Only intercept GET/HEAD — let POST (sync endpoint) go through unmodified
if (request.method !== 'GET' && request.method !== 'HEAD') return;
// The admin page is online-only and must never be served from a cache.
if (url.pathname === '/admin' || url.pathname.startsWith('/admin.')) return;
// API calls and binary downloads → network only, no caching
if (url.pathname.startsWith('/api/')) {
e.respondWith(fetch(request));