added scanning networks text

This commit is contained in:
Justin 2023-07-24 17:40:17 +08:00 committed by GitHub
parent 39f0496b92
commit 96410135c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3323,6 +3323,8 @@ function sendNetworkToSSID(element) {
function scanNetworks() { function scanNetworks() {
var networksListReset = document.getElementById("networks-list"); var networksListReset = document.getElementById("networks-list");
networksListReset.innerHTML = ""; networksListReset.innerHTML = "";
var listItem2 = document.createElement("li");
listItem2.textContent = "Scanning networks...";
fetch("/scanNetworks", { fetch("/scanNetworks", {
method: "PUT", method: "PUT",
}) })
@ -3330,7 +3332,7 @@ function scanNetworks() {
.then(data => { .then(data => {
// Parse the response data as JSON // Parse the response data as JSON
var networks = JSON.parse(data); var networks = JSON.parse(data);
networksListReset.innerHTML = "";
// Iterate over the networks object and create list items // Iterate over the networks object and create list items
for (var ssid in networks) { for (var ssid in networks) {
var listItem = document.createElement("li"); var listItem = document.createElement("li");