Awesome qr shit and fucks

This commit is contained in:
Nicolas A. Tonne
2015-06-06 01:31:56 +02:00
parent 084c049983
commit 2b9d891098
8 changed files with 75 additions and 72 deletions

View File

@@ -3,8 +3,11 @@ var id;
//var socket;
$(document).ready(function (){
//setTimeout(function(){$("#code-input").focus();},500);
//socket = io.connect('http://'+window.location.hostname+':3000');
setTimeout(function(){$("#code-input").focus();},500);
socket = io.connect('http://'+window.location.hostname+':3000');
id = window.location.pathname.split("/")[2];
if(id)
control();
});
document.getElementById("remote_play").addEventListener("click", function()
@@ -31,13 +34,13 @@ function control()
{
if(start)
{
id = $("#code-input").val().toLowerCase();
if(!id)id = $("#code-input").val().toLowerCase();
$("#code-input").val("");
start = false;
$("#volume-control").css("display", "block");
$("#remote-controls").css("display", "block");
$("#remote-text").text("Controlling "+ id.toUpperCase())
$("#code-input").attr("length", "18");
$("#code-input").attr("maxlength", "18");
$("#forsearch").html("Type new channel name to change to");