Skip to content
Snippets Groups Projects
Commit 81bfb59f authored by Stephen D's avatar Stephen D
Browse files

show what buttons are being pressed

parent b43daa2c
No related branches found
No related tags found
No related merge requests found
...@@ -157,13 +157,21 @@ function checkButtonStatus() { ...@@ -157,13 +157,21 @@ function checkButtonStatus() {
let datas = {}; let datas = {};
function renderData() { function renderData() {
let html = "<table><tr><th>Data</th><th>Count</th>"; let html = "<table><tr><th>Data</th><th>Count</th><th>Buttons</th></tr>";
const keys = Object.keys(datas); const keys = Object.keys(datas);
for (let i = 0; i < keys.length; i++) { for (let i = 0; i < keys.length; i++) {
const key = keys[i]; const key = keys[i];
const val = datas[key]; const val = datas[key];
html += `<tr><td>${key}</td><td>${val}</td></tr>`; let buttons = [];
for (let i = 0; i < Object.keys(qr).length; i++) {
const k = Object.keys(qr)[i];
if (qr[k]) {
buttons.push(k);
}
}
html += `<tr><td>${key}</td><td>${val}</td><td>${buttons}</td></tr>`;
} }
html += "</table>"; html += "</table>";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment