Seems Chrome didn't like that technique

This commit is contained in:
Neale Pickett 2023-01-22 16:54:34 -07:00
parent dc3efd3104
commit 1d861b75e4
2 changed files with 9 additions and 12 deletions

View File

@ -19,10 +19,8 @@
<!-- Vail stuff --> <!-- Vail stuff -->
<link rel="manifest" href="manifest.json"> <link rel="manifest" href="manifest.json">
<link rel="icon" class="quiet icon" href="assets/vail.png" sizes="256x256" type="image/png"> <link rel="icon" href="assets/vail.png" data-rx="assets/vail-rx.png" sizes="256x256" type="image/png">
<link rel="icon" class="quiet icon" href="assets/vail.svg" sizes="any" type="image/svg+xml"> <link rel="icon" href="assets/vail.svg" data-rx="assets/vail-rx.svg" sizes="any" type="image/svg+xml">
<link rel="" class="rx icon" href="assets/vail-rx.png" sizes="256x256" type="image/png">
<link rel="" class="rx icon" href="assets/vail-rx.svg" sizes="any" type="image/svg+xml">
<script type="module" src="scripts/vail.mjs"></script> <script type="module" src="scripts/vail.mjs"></script>
<script type="module" src="scripts/ui.mjs"></script> <script type="module" src="scripts/ui.mjs"></script>
<link rel="stylesheet" href="vail.css"> <link rel="stylesheet" href="vail.css">

View File

@ -165,13 +165,12 @@ class VailClient {
document.querySelector("#keyer-rate").dispatchEvent(new Event("input")) document.querySelector("#keyer-rate").dispatchEvent(new Event("input"))
} }
setIconBase(icon) { setIconType(iconType="silent") {
for (let e of document.querySelectorAll("link.icon")) { for (let e of document.querySelectorAll("link[rel=icon]")) {
if (e.classList.contains(icon)) { if (! e.dataset.silent) {
e.relList.add("icon") e.dataset.silent = e.href
} else {
e.relList.remove("icon")
} }
e.href = e.dataset[iconType]
} }
} }
@ -179,8 +178,8 @@ class VailClient {
this.outputs.Buzz(false) this.outputs.Buzz(false)
clearTimeout(this.activityTimeout) clearTimeout(this.activityTimeout)
this.activityTimeout = setTimeout(() => this.setIconBase("quiet"), 2*time.Second) this.activityTimeout = setTimeout(() => this.setIconType(), 2*time.Second)
this.setIconBase("rx") this.setIconType("rx")
if (this.rxChart) this.rxChart.Set(1) if (this.rxChart) this.rxChart.Set(1)
} }