mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added colors in chrome android
This commit is contained in:
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -141,14 +141,14 @@ var Youtube = {
|
|||||||
setBGimage: function(id){
|
setBGimage: function(id){
|
||||||
if(id !== undefined)
|
if(id !== undefined)
|
||||||
{
|
{
|
||||||
console.log($("meta[name=theme-color]").attr("content", ""));
|
|
||||||
var img = new Image();
|
var img = new Image();
|
||||||
img.onload = function ()
|
img.onload = function ()
|
||||||
{
|
{
|
||||||
|
|
||||||
var colorThief = new ColorThief();
|
var colorThief = new ColorThief();
|
||||||
document.getElementsByTagName("body")[0].style.backgroundColor = Helper.rgbToHsl(colorThief.getColor(img));
|
document.getElementsByTagName("body")[0].style.backgroundColor = Helper.rgbToHsl(colorThief.getColor(img));
|
||||||
$("meta[name=theme-color]").attr("content", Helper.rgbToHex(colorThief.getColor(img)));
|
console.log(colorThief.getColor(img));
|
||||||
|
//$("meta[name=theme-color]").attr("content", Helper.rgbToHex(colorThief.getColor(img)));
|
||||||
};
|
};
|
||||||
|
|
||||||
img.crossOrigin = 'Anonymous';
|
img.crossOrigin = 'Anonymous';
|
||||||
|
|||||||
Reference in New Issue
Block a user