From 8338573c108c083f5be7f721c7dedf9e2a79f51d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Tron=C3=AD=C4=8Dek?= Date: Mon, 8 Feb 2021 17:19:28 +0100 Subject: [PATCH] Template string output --- devices.html | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/devices.html b/devices.html index 99ae4f5..3aea201 100644 --- a/devices.html +++ b/devices.html @@ -146,18 +146,13 @@ Object.entries(json) .sort() .forEach(([key, value]) => { - output += "
"; - - output += - "" + - value.label + - "" + - value.deviceId + - ""; - - output += "
"; + output += ` +
+ ${value.label} + + ${value.deviceId} + +
`; }); output += ""; document.getElementById(element).innerHTML = output;