commit 139ad5958c13b22f41ebdc5f888dcb61fd59405e Author: Dan Date: Sat Feb 21 18:24:08 2026 +0000 Adding basic version for testing diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..892c17d --- /dev/null +++ b/icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/index.html b/index.html new file mode 100644 index 0000000..feed244 --- /dev/null +++ b/index.html @@ -0,0 +1,877 @@ + + + + + + + + + + + + + Status Poster + + + + + +
+
+ + +
+ +
+ +
+
+ 📝 +
+ + Click to change emoji +
+ + +
+ + +
0 / 5000
+
+ + +
+ + +
+ + + +
+
+ + +
+ + + + + + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..4d31bbd --- /dev/null +++ b/manifest.json @@ -0,0 +1,24 @@ +{ + "name": "Status Poster", + "short_name": "Status", + "description": "Post status updates to status.lol", + "start_url": ".", + "display": "standalone", + "orientation": "portrait", + "background_color": "#ffffff", + "theme_color": "#7c3aed", + "icons": [ + { + "src": "icon.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "any" + }, + { + "src": "icon.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "maskable" + } + ] +} diff --git a/sw.js b/sw.js new file mode 100644 index 0000000..0058da3 --- /dev/null +++ b/sw.js @@ -0,0 +1,30 @@ +const CACHE = 'status-poster-v1'; +const PRECACHE = ['.', 'index.html', 'manifest.json', 'sw.js', 'icon.svg']; + +self.addEventListener('install', e => { + e.waitUntil( + caches.open(CACHE) + .then(c => c.addAll(PRECACHE)) + .then(() => self.skipWaiting()) + ); +}); + +self.addEventListener('activate', e => { + e.waitUntil( + caches.keys() + .then(keys => Promise.all( + keys.filter(k => k !== CACHE).map(k => caches.delete(k)) + )) + .then(() => self.clients.claim()) + ); +}); + +self.addEventListener('fetch', e => { + // Never intercept API calls — always go to network + if (e.request.url.includes('api.omg.lol')) return; + + e.respondWith( + caches.match(e.request) + .then(cached => cached || fetch(e.request)) + ); +});