|
|
@ -14,7 +14,6 @@ var line_kind = 1; |
|
|
|
|
|
|
|
function init() { |
|
|
|
myName = document.getElementById('loginname').value; |
|
|
|
console.log(myName); |
|
|
|
var login = document.getElementById('login'); |
|
|
|
login.parentNode.removeChild(login); |
|
|
|
|
|
|
@ -35,17 +34,14 @@ function init() { |
|
|
|
|
|
|
|
function onOpen(evt) { |
|
|
|
updateUser(); |
|
|
|
setInterval(poll, speed); |
|
|
|
setInterval(poll, speed, true); |
|
|
|
} |
|
|
|
|
|
|
|
function onMessage(evt) { |
|
|
|
console.log(evt.data); |
|
|
|
var ret = JSON.parse(evt.data); |
|
|
|
var balls = ret.balls; |
|
|
|
var lines = ret.lines; |
|
|
|
|
|
|
|
statusbar.innerHTML = balls.length; |
|
|
|
|
|
|
|
if(balls){ |
|
|
|
updateBalls(balls); |
|
|
|
} |
|
|
|