Skip to content

Commit 0736c39

Browse files
committed
fixed indexes
1 parent df8e298 commit 0736c39

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

script.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendFunc){
2222
titleNode.appendChild(titleText)
2323
var titlebreak1 = document.createElement("br")
2424
var titlebreak2 = document.createElement("br")
25-
parent[0].appendChild(titlebreak1)
26-
parent[0].appendChild(titleNode)
27-
parent[0].appendChild(titlebreak2)
25+
parent.appendChild(titlebreak1)
26+
parent.appendChild(titleNode)
27+
parent.appendChild(titlebreak2)
2828
if (json.length == 0) {
2929
console.log("empty server list")
3030
var notifyNode = document.createElement("H3")
3131
var notifyText = document.createTextNode("No servers are currently running or this game does not use SLS or is not in the repository.")
3232
notifyNode.appendChild(notifyText)
33-
parent[0].appendChild(notifyNode)
33+
parent.appendChild(notifyNode)
3434
} else {
3535
for (var index = 0; index < json.length; index++) {
3636
var element = json[index];
@@ -40,8 +40,8 @@ chrome.runtime.onMessage.addListener(function (request, sender, sendFunc){
4040
var linebreak = document.createElement("br")
4141
var text = document.createTextNode("Press to join server! (amount of players: " + element.registeredPlayerCount + ")")
4242
button.appendChild(text)
43-
parent[0].appendChild(button)
44-
parent[0].appendChild(linebreak)
43+
parent.appendChild(button)
44+
parent.appendChild(linebreak)
4545
}
4646
}
4747
})

0 commit comments

Comments
 (0)