Skip to content

Commit

Permalink
Update widget.html
Browse files Browse the repository at this point in the history
  • Loading branch information
wmpmills authored Nov 15, 2023
1 parent 2dbf0e0 commit aa8f4b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,16 @@ <h1 class="title" id="closeProximiity">...</h1>
const urlParams = new URLSearchParams(queryString);
const username = urlParams.get("username");
const password = urlParams.get("password");
let ipAddress = urlParams.get("ipAddress");

let connected = false;

console.log(username, password);

// Only attempt to connect to the local host if URL parameters are present
if (username && password) {
console.log(`Connecting to Device`);
if(!ipAddress) ipAddress = 'localhost';
console.log(`Connecting to Device`, ipAddress);
status.innerHTML = `URL Parameters Found - Connecting to Device`;
connectToDevice();
} else {
Expand Down

0 comments on commit aa8f4b4

Please sign in to comment.