mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-02 13:35:02 +08:00
15 lines
347 B
JavaScript
15 lines
347 B
JavaScript
self.addEventListener("install", function (event) {
|
|
event.waitUntil(
|
|
caches.open("sw-cache").then(function (cache) {
|
|
return cache.add("index.html");
|
|
})
|
|
);
|
|
});
|
|
|
|
self.addEventListener("fetch", function (event) {
|
|
event.respondWith(
|
|
caches.match(event.request).then(function (response) {
|
|
return response;
|
|
})
|
|
);
|
|
});
|