Allowing users to define their player's colors

This commit is contained in:
Kasper Rynning-Tønnesen
2018-11-06 13:53:37 +01:00
parent 2003383967
commit be9d74d271
5 changed files with 61 additions and 112 deletions

View File

@@ -675,7 +675,7 @@ var Player = {
if(!client && !embed) {
document.getElementById("host-title").innerText = title;
}
}
document.getElementById("song-title").innerText = title;
if(!client) document.getElementById("viewers").innerHTML = outPutWord + " " + v;
document.getElementById("song-title").setAttribute("title", title);
@@ -923,6 +923,10 @@ var Player = {
setBGimage: function(c){
var color = c.color;
if(Crypt.get_background_color() != "dynamic") {
Crypt.set_background_color(Crypt.get_background_color());
return;
}
if(window.location.pathname != "/" && ((offline && c.only) || (!offline && !c.only) || (!offline && c.only))) {
document.getElementById("main-container").style.backgroundColor = Helper.rgbToHsl(color,true);
Helper.css("#nav", "background-color", Helper.rgbToHsl(color, true));