mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Merge branch 'dev' of github.com:nixolas1/Zoff into dev
This commit is contained in:
@@ -21,19 +21,6 @@ $(document).ready(function()
|
||||
}
|
||||
});
|
||||
|
||||
$("body").keyup(function(event) {
|
||||
if(event.keyCode == 27){
|
||||
$("#results").html("");
|
||||
$(".main").removeClass("blurT");
|
||||
$("#controls").removeClass("blurT");
|
||||
$(".main").removeClass("clickthrough");
|
||||
if(!contains($("#search-wrapper").attr("class").split(" "), "hide"))
|
||||
$("#search-wrapper").toggleClass("hide");
|
||||
if(contains($("#song-title").attr("class").split(" "), "hide"))
|
||||
$("#song-title").toggleClass("hide");
|
||||
}
|
||||
});
|
||||
|
||||
$(".search_input").focus();
|
||||
$(".search_input").keyup(function(event) {
|
||||
search_input = $(this).val();
|
||||
@@ -99,7 +86,16 @@ $(document).ready(function()
|
||||
});
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
if ($("div.result").length > 2){
|
||||
if(event.keyCode == 27){
|
||||
$("#results").html("");
|
||||
$(".main").removeClass("blurT");
|
||||
$("#controls").removeClass("blurT");
|
||||
$(".main").removeClass("clickthrough");
|
||||
if(!contains($("#search-wrapper").attr("class").split(" "), "hide"))
|
||||
$("#search-wrapper").toggleClass("hide");
|
||||
if(contains($("#song-title").attr("class").split(" "), "hide"))
|
||||
$("#song-title").toggleClass("hide");
|
||||
}else if ($("div.result").length > 2){
|
||||
if (e.keyCode == 40) {
|
||||
if(i < $("div.result").length -2)
|
||||
i++;
|
||||
|
||||
@@ -224,19 +224,14 @@ function getTitle(titt, v)
|
||||
function errorHandler(newState)
|
||||
{
|
||||
var failsafe = ytplayer.getVideoUrl().split("https://www.youtube.com/watch");
|
||||
if(video_id !== undefined && !failsafe[0] == "" && !failsafe[1] == "")
|
||||
if(newState.data == 5 || newState.data == 100 || newState.data == 101 || newState.data == 150)
|
||||
{
|
||||
console.log(video_id);
|
||||
console.log(ytplayer.getVideoUrl());
|
||||
console.log("errorskip");
|
||||
socket.emit("skip");
|
||||
}
|
||||
}
|
||||
|
||||
function onPlayerReady(event) {
|
||||
player_ready = true;
|
||||
console.log(ytplayer.getVideoUrl());
|
||||
console.log(ytplayer.getVideoUrl().split("https://www.youtube.com/watch"));
|
||||
if(!window.mobilecheck())
|
||||
{
|
||||
$("#player").css("opacity", "1");
|
||||
|
||||
Reference in New Issue
Block a user