diff --git a/index.php b/index.php index 6a676cb5..3bd0d5fd 100755 --- a/index.php +++ b/index.php @@ -30,7 +30,7 @@ Loading...
  • - +
  • diff --git a/php/nochan.php b/php/nochan.php index b478f8f9..c55929f6 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -91,7 +91,7 @@ if(isset($_GET['chan'])){ clicks, useful for Angular/Meteor + }); + $('.collapsible').collapsible({ + accordion : true // A setting that changes the collapsible behavior to expandable instead of the default accordion style + }); + + //awdwad + $(".video-container").resizable({ + start: function(event, ui) { + $('iframe').css('pointer-events','none'); + }, + stop: function(event, ui) { + $('iframe').css('pointer-events','auto'); + Crypt.set_width($(this).width()); + }, + handles: "e", + minWidth: 350 + }); + + /* + if(localStorage[chan.toLowerCase()]) + { + if(localStorage[chan.toLowerCase()].length != 64) + localStorage.removeItem(chan.toLowerCase()); + else + socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]); + }*/ + + + socket = io.connect(''+add+':8880', connection_options); + Player.setup_youtube_listener(chan); + Admin.admin_listener(); + List.channel_listener(); + + socket.on("get_list", function(){ + //setTimeout(function(){ + socket.emit('list', chan.toLowerCase()); + /*if(Crypt.get_pass(chan.toLowerCase()) != undefined){ + socket.emit("password", [Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), chan.toLowerCase()]); + }*/ + }); + + socket.on("suggested", function(params){ + var single = true; + if(params.id == undefined) + single = false; + //setTimeout(function(){ + Suggestions.catchUserSuggests(params, single); + //}, 1000); + }); + + socket.on("viewers", function(view) + { + viewers = view; + + if(song_title !== undefined) + Player.getTitle(song_title, viewers); + }); + + if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){ + document.getElementById("search").blur(); + Player.readyLooks(); + }else{ + Chat.setup_chat_listener(chan); + Chat.allchat_listener(); + if(!window.mobilecheck()) Hostcontroller.host_listener(); + window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady; + Player.loadPlayer(); + + $("#chat-btn").sideNav({ + menuWidth: 272, // Default is 240 + edge: 'left', // Choose the horizontal origin + closeOnClick: false // Closes side-nav on clicks, useful for Angular/Meteor + }); + + if($(".drag-target").length > 0) $(".drag-target")[1].remove(); + + if(!Helper.msieversion()) Notification.requestPermission(); + + git_info = $.ajax({ type: "GET", + url: "https://api.github.com/repos/zoff-music/zoff/commits", + async: false + }).responseText; + + git_info = $.parseJSON(git_info); + $("#latest-commit").html("Latest Commit:
    " + + git_info[0].commit.author.date.substring(0,10) + + ": " + git_info[0].committer.login + + "
    " + + git_info[0].sha.substring(0,10) + ": " + + git_info[0].commit.message+" clicks, useful for Angular/Meteor - }); - $('.collapsible').collapsible({ - accordion : true // A setting that changes the collapsible behavior to expandable instead of the default accordion style - }); - //awdwad - $(".video-container").resizable({ - start: function(event, ui) { - $('iframe').css('pointer-events','none'); - }, - stop: function(event, ui) { - $('iframe').css('pointer-events','auto'); - Crypt.set_width($(this).width()); - }, - handles: "e", - minWidth: 350 - }); - - /* - if(localStorage[chan.toLowerCase()]) - { - if(localStorage[chan.toLowerCase()].length != 64) - localStorage.removeItem(chan.toLowerCase()); - else - socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]); - }*/ + }); - socket = io.connect(''+add+':8880', connection_options); - Player.setup_youtube_listener(chan); - Admin.admin_listener(); - List.channel_listener(); - - socket.on("get_list", function(){ - //setTimeout(function(){ - socket.emit('list', chan.toLowerCase()); - /*if(Crypt.get_pass(chan.toLowerCase()) != undefined){ - socket.emit("password", [Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), chan.toLowerCase()]); - }*/ - }); - - socket.on("suggested", function(params){ - var single = true; - if(params.id == undefined) - single = false; - //setTimeout(function(){ - Suggestions.catchUserSuggests(params, single); - //}, 1000); - }); - - socket.on("viewers", function(view) - { - viewers = view; - - if(song_title !== undefined) - Player.getTitle(song_title, viewers); - }); - - if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){ - document.getElementById("search").blur(); - Player.readyLooks(); - }else{ - Chat.setup_chat_listener(chan); - Chat.allchat_listener(); - if(!window.mobilecheck()) Hostcontroller.host_listener(); - window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady; - Player.loadPlayer(); - - $("#chat-btn").sideNav({ - menuWidth: 272, // Default is 240 - edge: 'left', // Choose the horizontal origin - closeOnClick: false // Closes side-nav on clicks, useful for Angular/Meteor - }); - - if($(".drag-target").length > 0) $(".drag-target")[1].remove(); - - if(!Helper.msieversion()) Notification.requestPermission(); - - git_info = $.ajax({ type: "GET", - url: "https://api.github.com/repos/zoff-music/zoff/commits", - async: false - }).responseText; - - git_info = $.parseJSON(git_info); - $("#latest-commit").html("Latest Commit:
    " - + git_info[0].commit.author.date.substring(0,10) - + ": " + git_info[0].committer.login - + "
    " - + git_info[0].sha.substring(0,10) + ": " - + git_info[0].commit.message+"'); - + $("#search").attr("placeholder", "Find song on YouTube..."); + } window.init = init; @@ -1750,7 +1752,7 @@ var Nochan = { document.getElementById("searches").innerHTML = output; //Materialize.fadeInImage('#channels'); $("#channels").fadeIn(800); - $("#search").focus(); + $("#searchFrontpage").focus(); }, sortFunction: function(a, b) { @@ -1786,11 +1788,13 @@ var Nochan = { if(Nochan.blob_list[i] !== undefined){ //$(".room-namer").css("opacity", 0); setTimeout(function(){ - $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); - $("#mega-background").css("background-size" , "200%"); - $("#mega-background").css("opacity", 1); - $("#search").attr("placeholder", list[i][3]); - //$(".room-namer").css("opacity", 1); + if(frontpage){ + $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); + $("#mega-background").css("background-size" , "200%"); + $("#mega-background").css("opacity", 1); + $("#searchFrontpage").attr("placeholder", list[i][3]); + //$(".room-namer").css("opacity", 1); + } },500); }else{ @@ -1810,7 +1814,7 @@ var Nochan = { $("#mega-background").css("background", "url(data:image/png;base64,"+data+")"); $("#mega-background").css("background-size" , "200%"); $("#mega-background").css("opacity", 1); - $("#search").attr("placeholder", list[i][3]); + $("#searchFrontpage").attr("placeholder", list[i][3]); //$(".room-namer").css("opacity", 1); },500); //then append the result where ever you want like @@ -1823,7 +1827,7 @@ var Nochan = { $("#mega-background").css("background", "url("+img.src+")"); $("#mega-background").css("background-size" , "200%"); $("#mega-background").css("opacity", 1); - $("#search").attr("placeholder", list[i][3]); + $("#searchFrontpage").attr("placeholder", list[i][3]); }; } @@ -1898,7 +1902,7 @@ var Nochan = { $("body").attr("id", "channelpage"); $("header").html($($(e)[57]).html()); $("main").html($($(e)[61]).html()); - $("#search").attr("placeholder", "Find song on youtube"); + $("#search").attr("placeholder", "Find song on YouTube..."); if($("#alreadychannel").length == 1){ window.init(); }else{ diff --git a/static/js/listeners.js b/static/js/listeners.js index 12a7a0a3..4f668370 100755 --- a/static/js/listeners.js +++ b/static/js/listeners.js @@ -72,151 +72,152 @@ function init(){ //setTimeout(function(){ - if(Player != undefined) Player.stopInterval= false; - //window.vote = List.vote; - //window.submit = Search.submit; - //window.submitAndClose = Search.submitAndClose; + if(Player != undefined) Player.stopInterval= false; + //window.vote = List.vote; + //window.submit = Search.submit; + //window.submitAndClose = Search.submitAndClose; - if(!localStorage["list_update"] || localStorage["list_update"] != "13.06.15") - { - localStorage.setItem("list_update", "13.06.15"); - window.location.reload(true); + if(!localStorage["list_update"] || localStorage["list_update"] != "13.06.15") + { + localStorage.setItem("list_update", "13.06.15"); + window.location.reload(true); + } + + $('ul.tabs').tabs(); + $("#settings").sideNav({ + menuWidth: 300, // Default is 240 + edge: 'right', // Choose the horizontal origin + closeOnClick: false // Closes side-nav on clicks, useful for Angular/Meteor + }); + $('.collapsible').collapsible({ + accordion : true // A setting that changes the collapsible behavior to expandable instead of the default accordion style + }); + + //awdwad + $(".video-container").resizable({ + start: function(event, ui) { + $('iframe').css('pointer-events','none'); + }, + stop: function(event, ui) { + $('iframe').css('pointer-events','auto'); + Crypt.set_width($(this).width()); + }, + handles: "e", + minWidth: 350 + }); + + /* + if(localStorage[chan.toLowerCase()]) + { + if(localStorage[chan.toLowerCase()].length != 64) + localStorage.removeItem(chan.toLowerCase()); + else + socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]); + }*/ + + + socket = io.connect(''+add+':8880', connection_options); + Player.setup_youtube_listener(chan); + Admin.admin_listener(); + List.channel_listener(); + + socket.on("get_list", function(){ + //setTimeout(function(){ + socket.emit('list', chan.toLowerCase()); + /*if(Crypt.get_pass(chan.toLowerCase()) != undefined){ + socket.emit("password", [Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), chan.toLowerCase()]); + }*/ + }); + + socket.on("suggested", function(params){ + var single = true; + if(params.id == undefined) + single = false; + //setTimeout(function(){ + Suggestions.catchUserSuggests(params, single); + //}, 1000); + }); + + socket.on("viewers", function(view) + { + viewers = view; + + if(song_title !== undefined) + Player.getTitle(song_title, viewers); + }); + + if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){ + document.getElementById("search").blur(); + Player.readyLooks(); + }else{ + Chat.setup_chat_listener(chan); + Chat.allchat_listener(); + if(!window.mobilecheck()) Hostcontroller.host_listener(); + window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady; + Player.loadPlayer(); + + $("#chat-btn").sideNav({ + menuWidth: 272, // Default is 240 + edge: 'left', // Choose the horizontal origin + closeOnClick: false // Closes side-nav on clicks, useful for Angular/Meteor + }); + + if($(".drag-target").length > 0) $(".drag-target")[1].remove(); + + if(!Helper.msieversion()) Notification.requestPermission(); + + git_info = $.ajax({ type: "GET", + url: "https://api.github.com/repos/zoff-music/zoff/commits", + async: false + }).responseText; + + git_info = $.parseJSON(git_info); + $("#latest-commit").html("Latest Commit:
    " + + git_info[0].commit.author.date.substring(0,10) + + ": " + git_info[0].committer.login + + "
    " + + git_info[0].sha.substring(0,10) + ": " + + git_info[0].commit.message+" clicks, useful for Angular/Meteor - }); - $('.collapsible').collapsible({ - accordion : true // A setting that changes the collapsible behavior to expandable instead of the default accordion style - }); - //awdwad - $(".video-container").resizable({ - start: function(event, ui) { - $('iframe').css('pointer-events','none'); - }, - stop: function(event, ui) { - $('iframe').css('pointer-events','auto'); - Crypt.set_width($(this).width()); - }, - handles: "e", - minWidth: 350 - }); - - /* - if(localStorage[chan.toLowerCase()]) - { - if(localStorage[chan.toLowerCase()].length != 64) - localStorage.removeItem(chan.toLowerCase()); - else - socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]); - }*/ + }); - socket = io.connect(''+add+':8880', connection_options); - Player.setup_youtube_listener(chan); - Admin.admin_listener(); - List.channel_listener(); - - socket.on("get_list", function(){ - //setTimeout(function(){ - socket.emit('list', chan.toLowerCase()); - /*if(Crypt.get_pass(chan.toLowerCase()) != undefined){ - socket.emit("password", [Crypt.crypt_pass(Crypt.get_pass(chan.toLowerCase())), chan.toLowerCase()]); - }*/ - }); - - socket.on("suggested", function(params){ - var single = true; - if(params.id == undefined) - single = false; - //setTimeout(function(){ - Suggestions.catchUserSuggests(params, single); - //}, 1000); - }); - - socket.on("viewers", function(view) - { - viewers = view; - - if(song_title !== undefined) - Player.getTitle(song_title, viewers); - }); - - if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){ - document.getElementById("search").blur(); - Player.readyLooks(); - }else{ - Chat.setup_chat_listener(chan); - Chat.allchat_listener(); - if(!window.mobilecheck()) Hostcontroller.host_listener(); - window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady; - Player.loadPlayer(); - - $("#chat-btn").sideNav({ - menuWidth: 272, // Default is 240 - edge: 'left', // Choose the horizontal origin - closeOnClick: false // Closes side-nav on clicks, useful for Angular/Meteor - }); - - if($(".drag-target").length > 0) $(".drag-target")[1].remove(); - - if(!Helper.msieversion()) Notification.requestPermission(); - - git_info = $.ajax({ type: "GET", - url: "https://api.github.com/repos/zoff-music/zoff/commits", - async: false - }).responseText; - - git_info = $.parseJSON(git_info); - $("#latest-commit").html("Latest Commit:
    " - + git_info[0].commit.author.date.substring(0,10) - + ": " + git_info[0].committer.login - + "
    " - + git_info[0].sha.substring(0,10) + ": " - + git_info[0].commit.message+"'); - + $("#search").attr("placeholder", "Find song on YouTube..."); + } window.init = init; diff --git a/static/js/nochan.js b/static/js/nochan.js index 89ffe5d6..414482e8 100755 --- a/static/js/nochan.js +++ b/static/js/nochan.js @@ -93,7 +93,7 @@ var Nochan = { document.getElementById("searches").innerHTML = output; //Materialize.fadeInImage('#channels'); $("#channels").fadeIn(800); - $("#search").focus(); + $("#searchFrontpage").focus(); }, sortFunction: function(a, b) { @@ -129,11 +129,13 @@ var Nochan = { if(Nochan.blob_list[i] !== undefined){ //$(".room-namer").css("opacity", 0); setTimeout(function(){ - $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); - $("#mega-background").css("background-size" , "200%"); - $("#mega-background").css("opacity", 1); - $("#search").attr("placeholder", list[i][3]); - //$(".room-namer").css("opacity", 1); + if(frontpage){ + $("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")"); + $("#mega-background").css("background-size" , "200%"); + $("#mega-background").css("opacity", 1); + $("#searchFrontpage").attr("placeholder", list[i][3]); + //$(".room-namer").css("opacity", 1); + } },500); }else{ @@ -153,7 +155,7 @@ var Nochan = { $("#mega-background").css("background", "url(data:image/png;base64,"+data+")"); $("#mega-background").css("background-size" , "200%"); $("#mega-background").css("opacity", 1); - $("#search").attr("placeholder", list[i][3]); + $("#searchFrontpage").attr("placeholder", list[i][3]); //$(".room-namer").css("opacity", 1); },500); //then append the result where ever you want like @@ -166,7 +168,7 @@ var Nochan = { $("#mega-background").css("background", "url("+img.src+")"); $("#mega-background").css("background-size" , "200%"); $("#mega-background").css("opacity", 1); - $("#search").attr("placeholder", list[i][3]); + $("#searchFrontpage").attr("placeholder", list[i][3]); }; } @@ -241,7 +243,7 @@ var Nochan = { $("body").attr("id", "channelpage"); $("header").html($($(e)[57]).html()); $("main").html($($(e)[61]).html()); - $("#search").attr("placeholder", "Find song on youtube"); + $("#search").attr("placeholder", "Find song on YouTube..."); if($("#alreadychannel").length == 1){ window.init(); }else{