Nevermind, I'm not using it. It looks like shit

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-09 22:59:58 +02:00
parent 9986d5088c
commit 5a5f0c38e0

View File

@@ -252,7 +252,7 @@ function setBGimage(id){
var img = new Image(); var img = new Image();
img.onload = function () { img.onload = function () {
var colorThief = new ColorThief(); var colorThief = new ColorThief();
$("body").css("background-color", rgbToHsl(colorThief.getColor(img))); $("body").css("background-color", colorThief.getColor(img));
}; };
img.crossOrigin = 'Anonymous'; img.crossOrigin = 'Anonymous';
img.src = 'http://cors-anywhere.herokuapp.com/http://img.youtube.com/vi/'+id+'/mqdefault.jpg'; img.src = 'http://cors-anywhere.herokuapp.com/http://img.youtube.com/vi/'+id+'/mqdefault.jpg';