Made so if the server restarts, the new id for remote is listened to for the client

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-09 22:34:45 +02:00
parent a302ed5389
commit 78d23a0642

View File

@@ -8,8 +8,6 @@ socket.on("id", function(id)
$("#code-text").text(id.toUpperCase()) $("#code-text").text(id.toUpperCase())
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL); $("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
$("#code-link").attr("href", codeURL); $("#code-link").attr("href", codeURL);
if(!began)
{
socket.on(id, function(arr) socket.on(id, function(arr)
{ {
console.log(arr); console.log(arr);
@@ -47,5 +45,4 @@ socket.on("id", function(id)
skip(); skip();
}); });
} }
began = true;
}); });