diff --git a/src_data/scripts/utils.js b/src_data/scripts/utils.js index c728a8e..d225bfa 100644 --- a/src_data/scripts/utils.js +++ b/src_data/scripts/utils.js @@ -141,10 +141,18 @@ const setupNetworkScanForm = (formSelector, tableSelector) => { row.insertCell().textContent = `#${i + 1}`; const nameCell = row.insertCell(); - nameCell.innerHTML = result[i].hidden ? `${result[i].bssid}` : result[i].ssid; + if (result[i].hidden) { + const hiddenName = document.createElement('i'); + hiddenName.textContent = result[i].bssid; + nameCell.appendChild(hiddenName); + + } else { + nameCell.textContent = result[i].ssid; + } + nameCell.onclick = (event) => { const input = document.querySelector("[name='sta[ssid]']"); - const ssid = event.target.parentNode.dataset.ssid; + const ssid = row.dataset.ssid; if (!input || !ssid) { return; } @@ -922,4 +930,4 @@ function c2f(value) { function f2c(value) { return (value - 32) * (5 / 9); -} \ No newline at end of file +}