diff --git a/html/stat.js b/html/stat.js
index 3776531..2709eeb 100644
--- a/html/stat.js
+++ b/html/stat.js
@@ -114,7 +114,7 @@ function getCounters(port) {
const s = JSON.parse(xhttp.responseText);
console.log("Counters: ", JSON.stringify(s));
const ptext = document.getElementById('popup_text');
- var t = "
| " + t('stat_counter') + " | " + t('stat_value') + " | " + t('stat_counter') + " | " + t('stat_value') + " |
";
+ var tableHtml = " | " + t('stat_counter') + " | " + t('stat_value') + " | " + t('stat_counter') + " | " + t('stat_value') + " |
";
console.log("Counter 0: ", BigInt(s[0]).toString(), " length: ", s.length);
var c = 0;
for (i = 0; i < mib_counters.length; i += 4) {
@@ -125,28 +125,28 @@ function getCounters(port) {
}
var count = BigInt(s[i/4]);
if (mib_counters[i+1] == 8) {
- t += "| " + mib_counters[i] + " | " + count.toString() + " | ";
+ tableHtml += "" + mib_counters[i] + " | " + count.toString() + " | ";
c += 1;
} else if (mib_counters[i+1] == 4) {
if (mib_counters[i] != "") {
- t += "" + mib_counters[i] + " | " + (count >> 32n).toString() + " | ";
+ tableHtml += "" + mib_counters[i] + " | " + (count >> 32n).toString() + " | ";
c += 1;
}
if (c == 2) {
- t += "
";
+ tableHtml += "
";
c = 0;
}
if (mib_counters[i+2] != "") {
- t += "| " + mib_counters[i+2] + " | " + (count & 4294967295n).toString() + " | ";
+ tableHtml += "" + mib_counters[i+2] + " | " + (count & 4294967295n).toString() + " | ";
c += 1;
}
}
if (c == 2) {
- t += "
";
+ tableHtml += "
";
c = 0;
}
}
- ptext.innerHTML = t + "
";
+ ptext.innerHTML = tableHtml + "
";
popup.style.display = 'flex';
}
};