mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed list issues, and some rewrite errors in htaccess
This commit is contained in:
@@ -119,7 +119,7 @@ function populate_list(msg)
|
||||
|
||||
var video_title=decodeURIComponent(listeID.title);
|
||||
var video_id = listeID.id;
|
||||
var video_thumb = "background-image:url('https://img.youtube.com/vi/"+video_id+"/mqdefault.jpg');";
|
||||
var video_thumb = "background-image:url('//img.youtube.com/vi/"+video_id+"/mqdefault.jpg');";
|
||||
//var delsong = ""; if(pass_corr=="correct");
|
||||
var video_votes = listeID.votes;
|
||||
$("#wrapper").append(list_html);
|
||||
@@ -285,7 +285,7 @@ function generateSong(song_info, transition)
|
||||
var video_id = song_info.id;
|
||||
var video_title = song_info.title;
|
||||
var video_votes = song_info.votes;
|
||||
var video_thumb = "background-image:url('https://img.youtube.com/vi/"+video_id+"/mqdefault.jpg');";
|
||||
var video_thumb = "background-image:url('//img.youtube.com/vi/"+video_id+"/mqdefault.jpg');";
|
||||
|
||||
var song = $("<div>"+list_html+"</div>");
|
||||
if(transition) song.find("#list-song").css("height", 0);
|
||||
|
||||
@@ -82,7 +82,7 @@ $(document).ready(function (){
|
||||
list_html = $("#channels").html();
|
||||
$("#channels").empty();
|
||||
|
||||
var socket = io.connect('https://'+window.location.hostname+':3000');
|
||||
var socket = io.connect('//'+window.location.hostname+':3000');
|
||||
var playlists = [];
|
||||
socket.emit('frontpage_lists');
|
||||
socket.on('playlists', function(msg){
|
||||
|
||||
@@ -27,14 +27,14 @@ function setup_youtube_listener(channel)
|
||||
{
|
||||
socket.on(channel.toLowerCase()+",np", function(obj)
|
||||
{
|
||||
//console.log(obj);
|
||||
console.log(obj);
|
||||
if(obj[0].length == 0){
|
||||
console.log("Empty list");
|
||||
document.getElementById('song-title').innerHTML = "Empty channel. Add some songs!";
|
||||
$("#player_overlay").height($("#player").height());
|
||||
if(!window.mobilecheck())
|
||||
$("#player_overlay").toggleClass("hide");
|
||||
importOldList(channel.toLowerCasettings-barse());
|
||||
importOldList(channel.toLowerCase());
|
||||
}
|
||||
else{
|
||||
//console.log("gotten new song");
|
||||
@@ -267,16 +267,19 @@ function readyLooks()
|
||||
}
|
||||
|
||||
function setBGimage(id){
|
||||
var img = new Image();
|
||||
img.onload = function () {
|
||||
var colorThief = new ColorThief();
|
||||
//console.log(rgbToHsl(colorThief.getColor(img)));
|
||||
document.getElementsByTagName("body")[0].style.backgroundColor = rgbToHsl(colorThief.getColor(img))
|
||||
//$("body").css("background-color", rgbToHsl(colorThief.getColor(img)));
|
||||
//$("body").css("background-color", colorThief.getColor(img));
|
||||
};
|
||||
img.crossOrigin = 'Anonymous';
|
||||
img.src = 'https://cors-anywhere.herokuapp.com/http://img.youtube.com/vi/'+id+'/mqdefault.jpg';
|
||||
if(id !== undefined)
|
||||
{
|
||||
var img = new Image();
|
||||
img.onload = function () {
|
||||
var colorThief = new ColorThief();
|
||||
//console.log(rgbToHsl(colorThief.getColor(img)));
|
||||
document.getElementsByTagName("body")[0].style.backgroundColor = rgbToHsl(colorThief.getColor(img))
|
||||
//$("body").css("background-color", rgbToHsl(colorThief.getColor(img)));
|
||||
//$("body").css("background-color", colorThief.getColor(img));
|
||||
};
|
||||
img.crossOrigin = 'Anonymous';
|
||||
img.src = 'https://cors-anywhere.herokuapp.com/http://img.youtube.com/vi/'+id+'/mqdefault.jpg';
|
||||
}
|
||||
}
|
||||
|
||||
function notifyUser(id, title) {
|
||||
|
||||
Reference in New Issue
Block a user