mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed some errors with placeholder from frontpage
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
Loading...
|
||||
</li>
|
||||
<li class="search-container hide" id="search-wrapper">
|
||||
<input id="search" class="search_input" type="text" title="Search for songs..." placeholder="Find song on youtube" onsubmit="null;" autocomplete="off" />
|
||||
<input id="search" class="search_input" type="text" title="Search for songs..." placeholder="Find song on YouTube..." onsubmit="null;" autocomplete="off" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ if(isset($_GET['chan'])){
|
||||
<input
|
||||
class="input-field room-namer"
|
||||
type="text"
|
||||
id="search"
|
||||
id="searchFrontpage"
|
||||
name="chan"
|
||||
placeholder="chill"
|
||||
title="Type channel name here to create or listen to a channel. Only alphanumerical chars. [a-zA-Z0-9]+"
|
||||
|
||||
@@ -1573,17 +1573,17 @@ nav ul li:hover, nav ul li.active {
|
||||
height:50% !important;
|
||||
}
|
||||
|
||||
#search::-webkit-input-placeholder { /* WebKit browsers */
|
||||
#search::-webkit-input-placeholder, #searchFrontpage::-webkit-input-placeholder { /* WebKit browsers */
|
||||
color: #FFF;
|
||||
}
|
||||
#search:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
|
||||
#search:-moz-placeholder, #searchFrontpage:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
|
||||
color: #FFF;
|
||||
opacity: 1;
|
||||
}
|
||||
#search::-moz-placeholder { /* Mozilla Firefox 19+ */
|
||||
#search::-moz-placeholder, #searchFrontpage::-moz-placeholder { /* Mozilla Firefox 19+ */
|
||||
color: #FFF;
|
||||
opacity: 1;
|
||||
}
|
||||
#search:-ms-input-placeholder { /* Internet Explorer 10+ */
|
||||
#search:-ms-input-placeholder, #searchFrontpage:-ms-input-placeholder { /* Internet Explorer 10+ */
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
300
static/dist/main.min.js
vendored
300
static/dist/main.min.js
vendored
@@ -1181,150 +1181,151 @@ 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 <a> 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 <a> 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: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
Helper.sample();
|
||||
}
|
||||
|
||||
$( "#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) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".search_input").focus();
|
||||
$(".search_input").keyup(function(event) {
|
||||
|
||||
search_input = $(this).val();
|
||||
|
||||
if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13 && event.keyCode != 39 && event.keyCode != 37 &&
|
||||
event.keyCode != 17 && event.keyCode != 16 && event.keyCode != 225 && event.keyCode != 18) {
|
||||
clearTimeout(timeout_search);
|
||||
if(search_input.length < 3){$("#results").html("");}
|
||||
if(event.keyCode == 13){
|
||||
Search.search(search_input);
|
||||
}else{
|
||||
|
||||
timeout_search = setTimeout(function(){
|
||||
Search.search(search_input);
|
||||
}, 1000);
|
||||
/*i = 0;
|
||||
timer=100;*/
|
||||
}
|
||||
}
|
||||
|
||||
$('ul.tabs').tabs();
|
||||
$("#settings").sideNav({
|
||||
menuWidth: 300, // Default is 240
|
||||
edge: 'right', // Choose the horizontal origin
|
||||
closeOnClick: false // Closes side-nav on <a> 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 <a> 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: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
Helper.sample();
|
||||
}
|
||||
|
||||
$( "#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) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".search_input").focus();
|
||||
$(".search_input").keyup(function(event) {
|
||||
|
||||
search_input = $(this).val();
|
||||
|
||||
if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13 && event.keyCode != 39 && event.keyCode != 37 &&
|
||||
event.keyCode != 17 && event.keyCode != 16 && event.keyCode != 225 && event.keyCode != 18) {
|
||||
clearTimeout(timeout_search);
|
||||
if(search_input.length < 3){$("#results").html("");}
|
||||
if(event.keyCode == 13){
|
||||
Search.search(search_input);
|
||||
}else{
|
||||
|
||||
timeout_search = setTimeout(function(){
|
||||
Search.search(search_input);
|
||||
}, 1000);
|
||||
/*i = 0;
|
||||
timer=100;*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
/*setInterval(function(){
|
||||
timer--;
|
||||
@@ -1336,6 +1337,7 @@ function init(){
|
||||
|
||||
$("#embed-button").css("display", "inline-block");
|
||||
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
|
||||
$("#search").attr("placeholder", "Find song on YouTube...");
|
||||
|
||||
}
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -72,150 +72,151 @@ 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 <a> 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 <a> 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: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
Helper.sample();
|
||||
}
|
||||
|
||||
$( "#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) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".search_input").focus();
|
||||
$(".search_input").keyup(function(event) {
|
||||
|
||||
search_input = $(this).val();
|
||||
|
||||
if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13 && event.keyCode != 39 && event.keyCode != 37 &&
|
||||
event.keyCode != 17 && event.keyCode != 16 && event.keyCode != 225 && event.keyCode != 18) {
|
||||
clearTimeout(timeout_search);
|
||||
if(search_input.length < 3){$("#results").html("");}
|
||||
if(event.keyCode == 13){
|
||||
Search.search(search_input);
|
||||
}else{
|
||||
|
||||
timeout_search = setTimeout(function(){
|
||||
Search.search(search_input);
|
||||
}, 1000);
|
||||
/*i = 0;
|
||||
timer=100;*/
|
||||
}
|
||||
}
|
||||
|
||||
$('ul.tabs').tabs();
|
||||
$("#settings").sideNav({
|
||||
menuWidth: 300, // Default is 240
|
||||
edge: 'right', // Choose the horizontal origin
|
||||
closeOnClick: false // Closes side-nav on <a> 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 <a> 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: <br>"
|
||||
+ git_info[0].commit.author.date.substring(0,10)
|
||||
+ ": " + git_info[0].committer.login
|
||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||
+ git_info[0].commit.message+"<br");
|
||||
|
||||
Helper.sample();
|
||||
}
|
||||
|
||||
$( "#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) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(".search_input").focus();
|
||||
$(".search_input").keyup(function(event) {
|
||||
|
||||
search_input = $(this).val();
|
||||
|
||||
if (event.keyCode != 40 && event.keyCode != 38 && event.keyCode != 13 && event.keyCode != 39 && event.keyCode != 37 &&
|
||||
event.keyCode != 17 && event.keyCode != 16 && event.keyCode != 225 && event.keyCode != 18) {
|
||||
clearTimeout(timeout_search);
|
||||
if(search_input.length < 3){$("#results").html("");}
|
||||
if(event.keyCode == 13){
|
||||
Search.search(search_input);
|
||||
}else{
|
||||
|
||||
timeout_search = setTimeout(function(){
|
||||
Search.search(search_input);
|
||||
}, 1000);
|
||||
/*i = 0;
|
||||
timer=100;*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
/*setInterval(function(){
|
||||
timer--;
|
||||
@@ -227,6 +228,7 @@ function init(){
|
||||
|
||||
$("#embed-button").css("display", "inline-block");
|
||||
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
|
||||
$("#search").attr("placeholder", "Find song on YouTube...");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user