diff --git a/View/src/JS/dashboard.js b/View/src/JS/dashboard.js index ff7e6d3c..baa3219d 100644 --- a/View/src/JS/dashboard.js +++ b/View/src/JS/dashboard.js @@ -3,20 +3,8 @@ window.onload = function () { xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayersPseudo', true); xhr.responseType = 'text'; xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.onload = function () { - var players = JSON.parse(xhr.responseText); - // if (players[0] != null) { - // var player1 = players[0]; - // } - // if (players[1] != null) { - // var player2 = players[1]; - // } - // if (players[2] != null) { - // var player3 = players[2]; - // } - // if (players[3] != null) { - // var player4 = players[3]; - // } + var players = xhr.onload = function () { + return JSON.parse(xhr.responseText); }; xhr.send(null); data = [];