Only missing del, shuffle and remove after play

This commit is contained in:
Kasper Rynning-Tønnesen
2015-04-10 01:19:28 +02:00
parent 67eaaddb44
commit a8f84d446a
6 changed files with 322 additions and 344 deletions

View File

@@ -5,18 +5,18 @@ var timer = 0;
$(document).ready(function()
{
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function() { });
$("#search").focus();
$('#base').bind("keyup keypress", function(e) {
var code = e.keyCode || e.which;
if (code == 13) {
var code = e.keyCode || e.which;
if (code == 13) {
e.preventDefault();
return false;
}
});
$(".search_input").focus();
$(".search_input").keyup(function(event) {
var search_input = $(this).val();
@@ -27,7 +27,7 @@ $(document).ready(function()
{
peis = true;
loadjsfile("js/jazzscript.js");
}else
{
peis = false;
@@ -74,7 +74,7 @@ $(document).ready(function()
}
}
});
setInterval(function(){
@@ -85,7 +85,7 @@ $(document).ready(function()
}, 1);
});
$(document).keyup(function(e) {
$(document).keyup(function(e) {
if ($("div.result").length > 2){
if (e.keyCode == 40) {
if(i < $("div.result").length -2)
@@ -115,13 +115,13 @@ $(document).keyup(function(e) {
function search(search_input){
$("#results").html('');
if(search_input !== ""){
var keyword= encodeURIComponent(search_input);
var yt_url='http://gdata.youtube.com/feeds/api/videos?q='+keyword+'&format=5&orderby=relevance&max-results=6&v=2&alt=jsonc';
var yt_url='http://gdata.youtube.com/feeds/api/videos?q='+keyword+'&format=5&orderby=relevance&max-results=6&v=2&alt=jsonc';
$.ajax({
type: "GET",
@@ -163,7 +163,7 @@ function search(search_input){
}
$("<div id='r' style='display:none;'>"+wrapper+"</div>").appendTo('#results').slideDown('slow');
}
else{ $("#video").html("<div id='no'>No Video</div>");}
}
@@ -186,7 +186,7 @@ function submitAndClose(id,title){
function submit(id,title,type){
socket.emit("add", [id, title]);
socket.emit("add", [id, title, adminpass]);
/*
serverAns = $.ajax({
type: "GET",
@@ -229,7 +229,7 @@ function submit(id,title,type){
document.getElementById("sBar").innerHTML = "Successfully added song!";
$("#sBar").addClass("opacityFull");
}
$("#search").focus();
setTimeout(function(){