mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-01-08 10:35:34 +00:00
Almost working
This commit is contained in:
@@ -770,3 +770,8 @@ ul #chat-log{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#code-link + span{
|
||||
line-height: normal;
|
||||
color: black;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ socket.on("id", function(id)
|
||||
$("#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-link").attr("href", codeURL);
|
||||
|
||||
if(!began)
|
||||
{
|
||||
socket.on(id, function(arr)
|
||||
|
||||
@@ -27,14 +27,19 @@ document.getElementById("remote_skip").addEventListener("click", function()
|
||||
|
||||
document.getElementById("volume-control").addEventListener("click", function()
|
||||
{
|
||||
socket.emit("id", [id, "volume", $("#volume-control").val()]);
|
||||
console.log("Sending...")
|
||||
socket.emit("id", [id, "volume", $("#volume-control").val()]);
|
||||
console.log("Sent new vol signal")
|
||||
});
|
||||
|
||||
function control()
|
||||
{
|
||||
console.log("Start controlling")
|
||||
if(start)
|
||||
{
|
||||
if(!id)id = $("#code-input").val().toLowerCase();
|
||||
if($("#code-input").val())
|
||||
id = $("#code-input").val().toLowerCase();
|
||||
console.log("id="+id)
|
||||
$("#code-input").val("");
|
||||
start = false;
|
||||
|
||||
@@ -49,5 +54,5 @@ function control()
|
||||
socket.emit("id", [id, "channel", $("#code-input").val().toLowerCase()]);
|
||||
$("#code-input").val("");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user