Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
JustSch committed Oct 6, 2022
1 parent 161ef9b commit 0d550a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/scripts/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ window.onload = () => {
}).then((data) => {
let ipaddr = Object.values(data).flat();
let x = 0;
text.innerHTML = `Connect to <div id=\"ip-text\">${ipaddr[0]}:3000</div> on your other devices`;
text.innerHTML = `Connect to <div id=\"ip-text\">http://${ipaddr[0]}:3000</div> on your other devices`;
switchtext.addEventListener("click",((e) => {
e.preventDefault();
if (x === ipaddr.length -1) x = 0;
else x+=1;
let iptext = document.getElementById("ip-text");
iptext.innerText = `${ipaddr[x]}:3000`;
iptext.innerText = `http://${ipaddr[x]}:3000`;
console.log(ipaddr[x]);
}));
});
Expand Down

0 comments on commit 0d550a8

Please sign in to comment.