From 81bfb59fa5dafcb881dc1404f1ae00c82f525876 Mon Sep 17 00:00:00 2001
From: Stephen D <webmaster@scd31.com>
Date: Sun, 16 Mar 2025 14:12:51 -0400
Subject: [PATCH] show what buttons are being pressed

---
 app.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/app.js b/app.js
index 15a7c00..a0257d7 100644
--- a/app.js
+++ b/app.js
@@ -157,13 +157,21 @@ function checkButtonStatus() {
 let datas = {};
 
 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);
   for (let i = 0; i < keys.length; i++) {
     const key = keys[i];
     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>";
-- 
GitLab