mirror of https://github.com/nealey/vail.git
Now a PWA (but just barely)
This commit is contained in:
parent
aa4957bd0e
commit
d7de183d4c
|
@ -11,7 +11,8 @@
|
||||||
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
|
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
|
||||||
|
|
||||||
<!-- Vail stuff -->
|
<!-- Vail stuff -->
|
||||||
<link rel="icon" href="vail.png" sizes="128x128" type="image/png">
|
<link rel="manifest" href="manifest.json">
|
||||||
|
<link rel="icon" href="vail.png" sizes="256x256" type="image/png">
|
||||||
<link rel="icon" href="vail.svg" sizes="any" type="image/svg+xml">
|
<link rel="icon" href="vail.svg" sizes="any" type="image/svg+xml">
|
||||||
<script src="vail.js"></script>
|
<script src="vail.js"></script>
|
||||||
<link rel="stylesheet" href="vail.css">
|
<link rel="stylesheet" href="vail.css">
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "Vail: Morse Code",
|
||||||
|
"short_name": "Vail",
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#fff",
|
||||||
|
"theme_color": "#009688",
|
||||||
|
"description": "Internet Morse Code client",
|
||||||
|
"icons": [
|
||||||
|
{"src": "vail.png", "sizes": "250x250"},
|
||||||
|
{"src": "vail.svg", "sizes": "150x150"}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
// jshint asi:true
|
||||||
|
|
||||||
|
console.log("moo")
|
||||||
|
|
||||||
|
self.addEventListener("install", install)
|
||||||
|
function install(event) {
|
||||||
|
console.log(event)
|
||||||
|
event.waitUntil(Promise.resolve(true))
|
||||||
|
}
|
||||||
|
|
||||||
|
self.addEventListener("fetch", fetcher)
|
||||||
|
function fetcher(event) {
|
||||||
|
event.respondWith(fetch(event.request))
|
||||||
|
}
|
||||||
|
|
|
@ -618,6 +618,9 @@ class Vail {
|
||||||
}
|
}
|
||||||
|
|
||||||
function vailInit() {
|
function vailInit() {
|
||||||
|
if (navigator.serviceWorker) {
|
||||||
|
navigator.serviceWorker.register("sw.js")
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
window.app = new Vail()
|
window.app = new Vail()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|
BIN
static/vail.png
BIN
static/vail.png
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.0 KiB |
Loading…
Reference in New Issue