-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
01e971a
commit 9150b60
Showing
4 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "Text Editor", | ||
"short_name": "Text", | ||
"start_url": "texteditor.html", | ||
"display": "standalone", | ||
"theme_color": "cornflowerblue", | ||
"background_color": "lightblue", | ||
"orientation": "portrait-primary", | ||
"icons": [ | ||
{ | ||
"src": "/texteditor.png", | ||
"type": "image/png", "sizes": "72x72" | ||
} | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const staticDevCoffee = "dev-coffee-site-v1"; | ||
const assets = [ | ||
"/texteditor.html", | ||
"/texteditor.png" | ||
]; | ||
|
||
self.addEventListener("install", installEvent => { | ||
installEvent.waitUntil( | ||
caches.open(staticDevCoffee).then(cache => { | ||
cache.addAll(assets) | ||
}) | ||
) | ||
}); | ||
|
||
self.addEventListener("fetch", fetchEvent => { | ||
fetchEvent.respondWith( | ||
caches.match(fetchEvent.request).then(res => { | ||
return res || fetch(fetchEvent.request) | ||
}) | ||
) | ||
}); |