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:
@@ -1,84 +1,84 @@
|
|||||||
<li class="no-padding">
|
<li class="no-padding">
|
||||||
<ul class="collapsible collapsible-accordion">
|
<ul class="collapsible collapsible-accordion">
|
||||||
<li>
|
<li><a class="nav-btn close-settings" title="Close" href="#" onclick="hide_settings()" style="float:right;">
|
||||||
<a class="nav-btn close-settings" title="Close" href="#" onclick="hide_settings()">
|
<i class="mdi-navigation-close right-align"></i>
|
||||||
<i class="mdi-navigation-close right-align"></i>
|
</a>
|
||||||
</a>
|
<a class="col s9 collapsible-header bold waves-effect active">
|
||||||
<a class="col s9 collapsible-header bold waves-effect active">Channel Settings
|
Channel Settings
|
||||||
<i class="mdi-image-tune"></i>
|
<i class="mdi-image-tune"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="white-bg">
|
<form id="adminForm" onsubmit="pass_save();return false;">
|
||||||
<a class="white-bg">
|
<li class="white-bg">
|
||||||
<div class="input-field">
|
<a class="white-bg">
|
||||||
<input placeholder="Enter channel password" id="password" type="password" class="validate">
|
<div class="input-field">
|
||||||
</div>
|
<input placeholder="Enter channel password" id="password" type="password" class="validate">
|
||||||
</a>
|
</div>
|
||||||
</li>
|
</a>
|
||||||
<form id="adminForm">
|
</li>
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Add songs
|
Add songs
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Anyone
|
Anyone
|
||||||
<input name="addsongs" type="checkbox"><span class="lever"></span>
|
<input name="addsongs" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Admin
|
Admin
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Vote
|
Vote
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Anyone
|
Anyone
|
||||||
<input name="vote" type="checkbox"><span class="lever"></span>
|
<input name="vote" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Admin
|
Admin
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Shuffle
|
Shuffle
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Anyone
|
Anyone
|
||||||
<input name="shuffle" type="checkbox"><span class="lever"></span>
|
<input name="shuffle" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Admin
|
Admin
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Skip
|
Skip
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Anyone
|
Anyone
|
||||||
<input name="addsongs" type="checkbox"><span class="lever"></span>
|
<input name="skip" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Admin
|
Admin
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Song length
|
Song length
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Any
|
Any
|
||||||
<input name="longsongs" type="checkbox"><span class="lever"></span>
|
<input name="longsongs" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Short
|
Short
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Type
|
Type
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Any
|
Any
|
||||||
<input name="allvideos" type="checkbox"><span class="lever"></span>
|
<input name="allvideos" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Song
|
Song
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
Frontpage
|
Frontpage
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Display
|
Display
|
||||||
<input name="frontpage" type="checkbox"><span class="lever"></span>
|
<input name="frontpage" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Hide
|
Hide
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
<li><a class="setting-text">
|
<li><a class="setting-text">
|
||||||
After play
|
After play
|
||||||
<div class="switch"><label onclick="save()">
|
<div class="switch"><label>
|
||||||
Keep
|
Keep
|
||||||
<input name="removeplay" type="checkbox"><span class="lever"></span>
|
<input name="removeplay" type="checkbox" class="conf"><span class="lever"></span>
|
||||||
Remove
|
Remove
|
||||||
</label></div></a></li>
|
</label></div></a></li>
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ io.on('connection', function(socket){
|
|||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
db.createCollection(coll, function(err, docs){
|
db.createCollection(coll, function(err, docs){
|
||||||
db.collection(coll).insert({"addsongs":"false", "adminpass":"", "allvideos":"true", "frontpage":"true", "longsongs":"true", "removeplay": "false", "shuffle": "false", "skip": "true", "skips": [], "startTime":get_time(), "views": [], "vote": "false"}, function(err, docs)
|
db.collection(coll).insert({"addsongs":false, "adminpass":"", "allvideos":true, "frontpage":true, "longsongs":true, "removeplay": false, "shuffle": false, "skip": true, "skips": [], "startTime":get_time(), "views": [], "vote": false}, function(err, docs)
|
||||||
{
|
{
|
||||||
db.collection(coll).find().sort({votes:-1}, function(err, docs) {
|
db.collection(coll).find().sort({votes:-1}, function(err, docs) {
|
||||||
socket.emit(coll, docs);
|
socket.emit(coll, docs);
|
||||||
@@ -117,7 +117,7 @@ io.on('connection', function(socket){
|
|||||||
var hash = hash_pass(arr[2]);
|
var hash = hash_pass(arr[2]);
|
||||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
||||||
{
|
{
|
||||||
if((docs[0]["addsongs"] == "true" && (hash == docs[0]["adminpass"] || docs[0]["adminpass"] == "")) || docs[0]["addsongs"] == "false")
|
if((docs[0]["addsongs"] == true && (hash == docs[0]["adminpass"] || docs[0]["adminpass"] == "")) || docs[0]["addsongs"] == false)
|
||||||
{
|
{
|
||||||
db.collection(coll).find({id:id}, function(err, docs){
|
db.collection(coll).find({id:id}, function(err, docs){
|
||||||
if(docs.length == 0)
|
if(docs.length == 0)
|
||||||
@@ -153,7 +153,7 @@ io.on('connection', function(socket){
|
|||||||
var hash = hash_pass(msg[4]);
|
var hash = hash_pass(msg[4]);
|
||||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
||||||
{
|
{
|
||||||
if((docs[0]["vote"] == "true" && (hash == docs[0]["adminpass"] || docs[0]["adminpass"] == "")) || docs[0]["vote"] == "false")
|
if((docs[0]["vote"] == true && (hash == docs[0]["adminpass"] || docs[0]["adminpass"] == "")) || docs[0]["vote"] == false)
|
||||||
{
|
{
|
||||||
vote(coll, id, guid, socket);
|
vote(coll, id, guid, socket);
|
||||||
}else{
|
}else{
|
||||||
@@ -163,9 +163,23 @@ io.on('connection', function(socket){
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on('password', function(pw)
|
||||||
|
{
|
||||||
|
|
||||||
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||||
|
if(docs[0]["adminpass"] == "" || docs[0]["adminpass"] == hash_pass(pw))
|
||||||
|
{
|
||||||
|
db.collection(coll).update({views:{$exists:true}}, {$set:{adminpass:hash_pass(pw)}}, function(err, docs)
|
||||||
|
{
|
||||||
|
socket.emit("pw", pw);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
socket.on('skip', function(list)
|
socket.on('skip', function(list)
|
||||||
{
|
{
|
||||||
db.collection(coll).find({skip: "true"}, function(err, docs){
|
db.collection(coll).find({skip: false}, function(err, docs){
|
||||||
if(docs.length == 1)
|
if(docs.length == 1)
|
||||||
{
|
{
|
||||||
if(lists[coll].length/2 <= docs[0]["skips"]+1)
|
if(lists[coll].length/2 <= docs[0]["skips"]+1)
|
||||||
@@ -178,7 +192,7 @@ io.on('connection', function(socket){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}else
|
}else
|
||||||
socket.emit("sucess_settings", "No Skipping!");
|
socket.emit("toast", "No Skipping!");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -194,7 +208,10 @@ io.on('connection', function(socket){
|
|||||||
var skipping = params[7];
|
var skipping = params[7];
|
||||||
var shuffling = params[8];
|
var shuffling = params[8];
|
||||||
|
|
||||||
var hash = hash_pass(adminpass);
|
if(adminpass != "")
|
||||||
|
var hash = hash_pass(adminpass);
|
||||||
|
else
|
||||||
|
var hash = adminpass;
|
||||||
|
|
||||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||||
if(docs[0]["adminpass"] == "" || docs[0]["adminpass"] == hash)
|
if(docs[0]["adminpass"] == "" || docs[0]["adminpass"] == hash)
|
||||||
@@ -209,8 +226,12 @@ io.on('connection', function(socket){
|
|||||||
shuffle:shuffling,
|
shuffle:shuffling,
|
||||||
longsongs:longsongs,
|
longsongs:longsongs,
|
||||||
adminpass:hash}}, function(err, docs){
|
adminpass:hash}}, function(err, docs){
|
||||||
socket.emit("toast", "Successfully applied settings!");
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs)
|
||||||
sort_list(coll,undefined,false);
|
{
|
||||||
|
io.sockets.emit(coll+",conf", docs);
|
||||||
|
socket.emit("toast", "Successfully applied settings!");
|
||||||
|
});
|
||||||
|
//sort_list(coll,undefined,false);
|
||||||
});
|
});
|
||||||
|
|
||||||
}else
|
}else
|
||||||
@@ -223,7 +244,7 @@ io.on('connection', function(socket){
|
|||||||
socket.on('shuffle', function(pass){
|
socket.on('shuffle', function(pass){
|
||||||
var hash = hash_pass(pass);
|
var hash = hash_pass(pass);
|
||||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||||
if((docs[0]["adminpass"] == hash || docs[0]["adminpass"] == "") || docs[0]["shuffle"] == "true")
|
if((docs[0]["adminpass"] == hash || docs[0]["adminpass"] == "") || docs[0]["shuffle"] == true)
|
||||||
{
|
{
|
||||||
db.collection(coll).find({now_playing:false}).forEach(function(err, docs){
|
db.collection(coll).find({now_playing:false}).forEach(function(err, docs){
|
||||||
if(!docs){
|
if(!docs){
|
||||||
@@ -305,7 +326,7 @@ function vote(coll, id, guid, socket)
|
|||||||
function change_song(coll)
|
function change_song(coll)
|
||||||
{
|
{
|
||||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||||
if(docs[0]["removeplay"] == "true")
|
if(docs[0]["removeplay"] == true)
|
||||||
{
|
{
|
||||||
db.collection(coll).remove({now_playing:true}, function(err, docs)
|
db.collection(coll).remove({now_playing:true}, function(err, docs)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
{
|
{
|
||||||
transition: background-color .2s;
|
transition: background-color .2s;
|
||||||
min-width: 64px;
|
min-width: 64px;
|
||||||
|
float:right;
|
||||||
}
|
}
|
||||||
.nav-btn:hover{background-color:rgba(0,0,0,0.5);}
|
.nav-btn:hover{background-color:rgba(0,0,0,0.5);}
|
||||||
.hover-text{display:none;}
|
.hover-text{display:none;}
|
||||||
@@ -226,3 +227,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
.switch label {
|
.switch label {
|
||||||
color:#848484;
|
color:#848484;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.collapsible-body ul li.white-bg{
|
||||||
|
background-color:white !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
var adminTogg = false;
|
var adminTogg = false;
|
||||||
var pass_corr = "";
|
var pass_corr = "";
|
||||||
|
|
||||||
|
|
||||||
socket.on("toast", function(msg)
|
socket.on("toast", function(msg)
|
||||||
{
|
{
|
||||||
pass_corr = "correct";
|
pass_corr = "correct";
|
||||||
@@ -11,26 +12,51 @@ socket.on("toast", function(msg)
|
|||||||
remove_bar();*/
|
remove_bar();*/
|
||||||
});
|
});
|
||||||
|
|
||||||
|
socket.on("pw", function(msg)
|
||||||
|
{
|
||||||
|
w_p = false;
|
||||||
|
adminpass = msg;
|
||||||
|
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
|
||||||
|
for (var i = 0; i < names.length; i++) {
|
||||||
|
$("input[name="+names[i]+"]").attr("disabled", false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
socket.on(chan.toLowerCase()+",conf", function(msg)
|
||||||
|
{
|
||||||
|
populate_list(msg, true);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('input[class=conf]').change(function()
|
||||||
|
{
|
||||||
|
save();
|
||||||
|
});
|
||||||
|
|
||||||
|
function pass_save()
|
||||||
|
{
|
||||||
|
socket.emit('password', document.getElementById("password").value);
|
||||||
|
}
|
||||||
|
|
||||||
//function used in html onlick
|
//function used in html onlick
|
||||||
function save(){
|
function save(){
|
||||||
submitAdmin($("#adminForm"));
|
submitAdmin(document.getElementById("adminForm").elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitAdmin(form)
|
function submitAdmin(form)
|
||||||
{
|
{
|
||||||
voting = form.vote.value;
|
console.log(form);
|
||||||
addsongs = form.addsongs.value;
|
voting = form.vote.checked;
|
||||||
longsongs = form.longsongs.value;
|
addsongs = form.addsongs.checked;
|
||||||
frontpage = form.frontpage.value;
|
longsongs = form.longsongs.checked;
|
||||||
allvideos = form.allvideos.value;
|
frontpage = form.frontpage.checked;
|
||||||
removeplay = form.removeplay.value;
|
allvideos = form.allvideos.checked;
|
||||||
adminpass = form.pass.value;
|
removeplay = form.removeplay.checked;
|
||||||
skipping = form.skip.value;
|
//adminpass = document.getElementById("password").value;
|
||||||
shuffling = form.shuffle.value;
|
skipping = form.skip.checked;
|
||||||
|
shuffling = form.shuffle.checked;
|
||||||
|
|
||||||
configs = [voting, addsongs, longsongs, frontpage, allvideos, removeplay, adminpass, skipping, shuffling];
|
configs = [voting, addsongs, longsongs, frontpage, allvideos, removeplay, adminpass, skipping, shuffling];
|
||||||
alert(configs)
|
console.log(configs);
|
||||||
socket.emit("conf", configs);
|
socket.emit("conf", configs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,9 +7,10 @@ var showToggle =true;
|
|||||||
var chan = $("#chan").html();
|
var chan = $("#chan").html();
|
||||||
var list_html = $("#list-song-html").html();
|
var list_html = $("#list-song-html").html();
|
||||||
var hasadmin=0;
|
var hasadmin=0;
|
||||||
|
var w_p = true;
|
||||||
|
|
||||||
socket.on(guid, function(msg){
|
socket.on(guid, function(msg){
|
||||||
populate_list(msg);
|
populate_list(msg, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("abc", function(){
|
socket.on("abc", function(){
|
||||||
@@ -17,7 +18,7 @@ socket.on("abc", function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
socket.on(chan.toLowerCase(), function(msg){
|
socket.on(chan.toLowerCase(), function(msg){
|
||||||
populate_list(msg);
|
populate_list(msg, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on("skipping", function(obj)
|
socket.on("skipping", function(obj)
|
||||||
@@ -29,28 +30,34 @@ socket.on("skipping", function(obj)
|
|||||||
},1500);
|
},1500);
|
||||||
});
|
});
|
||||||
|
|
||||||
function populate_list(msg)
|
function populate_list(msg, conf_only)
|
||||||
{
|
{
|
||||||
console.log(msg);
|
console.log(msg);
|
||||||
|
console.log(conf_only);
|
||||||
$("#wrapper").empty();
|
if(!conf_only)
|
||||||
|
$("#wrapper").empty();
|
||||||
|
|
||||||
$.each(msg, function(j, listeID){
|
$.each(msg, function(j, listeID){
|
||||||
if(listeID.hasOwnProperty('startTime')) //check if its config part of list
|
if(listeID.hasOwnProperty('startTime')) //check if its config part of list
|
||||||
{
|
{
|
||||||
console.log("startTime");
|
console.log("startTime");
|
||||||
console.log(listeID.addsongs);
|
|
||||||
if(!adminTogg)
|
if(!adminTogg)
|
||||||
{
|
{
|
||||||
|
if(listeID['adminpass'] == "" || w_p == false) hasadmin = false;
|
||||||
|
else hasadmin = true;
|
||||||
|
music = listeID["allvideos"];
|
||||||
|
longsongs = listeID["longsongs"];
|
||||||
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
|
names=["vote","addsongs","longsongs","frontpage", "allvideos", "removeplay", "skip", "shuffle"];
|
||||||
for (var i = 0; i < names.length; i++) {
|
for (var i = 0; i < names.length; i++) {
|
||||||
document.getElementsByName(names[i])[0].checked = (listeID[names[i]] === 'true');
|
document.getElementsByName(names[i])[0].checked = (listeID[names[i]] === true);
|
||||||
|
if(hasadmin)
|
||||||
|
$("input[name="+names[i]+"]").attr("disabled", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(hasadmin)
|
/*if(hasadmin)
|
||||||
$("#setpass").text("Channel has admin");
|
$("#setpass").text("Channel has admin");
|
||||||
else
|
else
|
||||||
$("#setpass").text("Channel has no admin");
|
$("#setpass").text("Channel has no admin");*/
|
||||||
}
|
}
|
||||||
}else if(!listeID.now_playing){ //check that the song isnt playing
|
}else if(!listeID.now_playing){ //check that the song isnt playing
|
||||||
|
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ function search(search_input){
|
|||||||
if(search_input !== ""){
|
if(search_input !== ""){
|
||||||
var keyword= encodeURIComponent(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=30&v=2&alt=jsonc';
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
@@ -131,10 +131,11 @@ function search(search_input){
|
|||||||
if(response.data.items)
|
if(response.data.items)
|
||||||
{
|
{
|
||||||
var wrapper = "";
|
var wrapper = "";
|
||||||
|
z = 0;
|
||||||
$.each(response.data.items, function(i,data)
|
$.each(response.data.items, function(i,data)
|
||||||
{
|
{
|
||||||
if(data.duration > 720 && longS === 0){return;}
|
if(data.duration > 720 && longsongs == true){return;}
|
||||||
if(data.category == "Music" || music == 1){
|
if(data.category == "Music" || music == false){
|
||||||
var video_title=encodeURIComponent(data.title).replace(/'/g, "\\\'");
|
var video_title=encodeURIComponent(data.title).replace(/'/g, "\\\'");
|
||||||
var views=data.viewCount;
|
var views=data.viewCount;
|
||||||
var video_thumb = "http://i.ytimg.com/vi/"+data.id+"/default.jpg";
|
var video_thumb = "http://i.ytimg.com/vi/"+data.id+"/default.jpg";
|
||||||
@@ -147,11 +148,12 @@ function search(search_input){
|
|||||||
</div>\
|
</div>\
|
||||||
</div>";
|
</div>";
|
||||||
//<input id='add' title='Add several songs' type='button' class='button' value='+' onclick=\"submit('"+data.id+"','"+video_title+"', false);\">\
|
//<input id='add' title='Add several songs' type='button' class='button' value='+' onclick=\"submit('"+data.id+"','"+video_title+"', false);\">\
|
||||||
|
|
||||||
//+data.uploader+" • "+
|
//+data.uploader+" • "+
|
||||||
//$("#results").append(finalhtml);
|
//$("#results").append(finalhtml);
|
||||||
wrapper += finalhtml;
|
wrapper += finalhtml;
|
||||||
|
z++;
|
||||||
}
|
}
|
||||||
|
return (z !== 6);
|
||||||
});
|
});
|
||||||
//console.log(wrapper);
|
//console.log(wrapper);
|
||||||
//$("#results").append(wrapper).show("slow");
|
//$("#results").append(wrapper).show("slow");
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ $(document).ready(function()
|
|||||||
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
||||||
});
|
});
|
||||||
$('#settings-close').sideNav('hide');
|
$('#settings-close').sideNav('hide');
|
||||||
|
|
||||||
colorThief = new ColorThief();
|
colorThief = new ColorThief();
|
||||||
window.mobilecheck = function() {
|
window.mobilecheck = function() {
|
||||||
var check = false;
|
var check = false;
|
||||||
@@ -181,7 +181,7 @@ function onPlayerStateChange(newState) {
|
|||||||
function getTitle(titt, v)
|
function getTitle(titt, v)
|
||||||
{
|
{
|
||||||
var outPutWord = v > 1 ? "viewers" : "viewer";
|
var outPutWord = v > 1 ? "viewers" : "viewer";
|
||||||
var title= titt.replace(/\\\'/g, "'").replace(/"/g,"'").replace(/&/g,"&");
|
var title= decodeURIComponent(titt);
|
||||||
document.title = title + " • Zöff";
|
document.title = title + " • Zöff";
|
||||||
if(!window.mobilecheck()){
|
if(!window.mobilecheck()){
|
||||||
document.getElementById('search').placeholder = title + " • " + v + " " + outPutWord;
|
document.getElementById('search').placeholder = title + " • " + v + " " + outPutWord;
|
||||||
|
|||||||
Reference in New Issue
Block a user