From bf85dc7aed3eba63fae4594fe77870878424a723 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Sat, 29 Jun 2024 07:41:32 +0300 Subject: [PATCH] webui: data attribute for pre= and post= --- code/html/src/settings.mjs | 8 ++++---- code/html/src/status.html | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/code/html/src/settings.mjs b/code/html/src/settings.mjs index 282496bf..4352bf5a 100644 --- a/code/html/src/settings.mjs +++ b/code/html/src/settings.mjs @@ -695,12 +695,12 @@ export function setSpanValue(span, value) { } let content = ""; - if (span.attributes.pre) { - content += span.attributes.pre.value; + if (span.dataset["pre"]) { + content += span.dataset["pre"]; } content += value; - if (span.attributes.post) { - content += span.attributes.post.value; + if (span.dataset["post"]) { + content += span.dataset["post"]; } span.textContent = content; } diff --git a/code/html/src/status.html b/code/html/src/status.html index b9f05487..7a824eab 100644 --- a/code/html/src/status.html +++ b/code/html/src/status.html @@ -10,7 +10,7 @@ - + @@ -30,16 +30,16 @@ - + - + - ? + ?
@@ -61,13 +61,13 @@
- + - + - ? + ?