From 2b49cdcdac3905a4b6f75a326960c51f379a5f91 Mon Sep 17 00:00:00 2001 From: Elisha Hollander Date: Wed, 18 Dec 2024 11:08:15 +0000 Subject: [PATCH] pwa --- index.html | 6 +++++- manifest.json | 13 +++++++++++++ sw.js | 11 +++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 manifest.json create mode 100644 sw.js diff --git a/index.html b/index.html index 9cc2f64..bcfc1b7 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,9 @@ + + + Win95 @@ -36,6 +39,7 @@ - \ No newline at end of file + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..b9ea419 --- /dev/null +++ b/manifest.json @@ -0,0 +1,13 @@ +{ + "name": "win95", + "short_name": "win95", + "start_url": ".", + "icons": [{ + "src": "bliss.jpg", + "sizes": "4059x3264", + "type": "image/jpeg", + "purpose": "any" + }], + "display": "fullscreen", + "orientation": "landscape" +} diff --git a/sw.js b/sw.js new file mode 100644 index 0000000..28f5232 --- /dev/null +++ b/sw.js @@ -0,0 +1,11 @@ +self.addEventListener("install", e => e.waitUntil(caches.open("assets").then(cache => cache.addAll([ + "win95.zip", + "bliss.jpg", + "js-dos.js", + "index.html", + "wdosbox.js", + "js-dos.js.map", + "wdosbox.wasm.js", +])))); + +self.addEventListener("fetch", e => e.respondWith(caches.match(e.request) || fetch(e.request)));