From b01dabf8cc5ae1e929076fcdef434caefcf24732 Mon Sep 17 00:00:00 2001 From: wellenvogel Date: Thu, 2 Dec 2021 17:52:51 +0100 Subject: [PATCH] #10: use the system name as page headline and title --- web/index.html | 2 +- web/index.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index 6c3f44a..e6fc841 100644 --- a/web/index.html +++ b/web/index.html @@ -9,7 +9,7 @@
-

NMEA 2000 Gateway

+

NMEA 2000 Gateway

connected diff --git a/web/index.js b/web/index.js index 34a0e74..09ededb 100644 --- a/web/index.js +++ b/web/index.js @@ -98,6 +98,12 @@ function resetForm(ev) { el.dispatchEvent(changeEvent); } } + let name=jsonData.systemName; + if (name){ + let el=document.getElementById('headline'); + if (el) el.textContent=name; + document.title=name; + } }); } function checkMaxClients(v) {