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