From dc001b1b474d789eb878cf5973abd12d65143d12 Mon Sep 17 00:00:00 2001 From: Nathan Hadley Date: Tue, 24 Dec 2024 17:28:00 +0000 Subject: [PATCH] Remove obsolete code --- player.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/player.js b/player.js index e934d11..b7b0248 100644 --- a/player.js +++ b/player.js @@ -724,7 +724,7 @@ function uploadFile() { let rgbValues = medianColor.match(/\d+/g).map(Number); - if (window.getComputedStyle(document.body).backgroundColor == "rgb(0, 0, 0)" && (rgbValues[0] < 50 && rgbValues[1] < 50 && rgbValues[2] < 50)) { + if (rgbValues[0] < 50 && rgbValues[1] < 50 && rgbValues[2] < 50) { rgbValues[0] = 50; rgbValues[1] = 50; rgbValues[2] = 50; @@ -732,14 +732,6 @@ function uploadFile() { console.warn("Median colour is black, falling back on rgba(50, 50, 50, 0.25)..."); } - else if (window.getComputedStyle(document.body).backgroundColor == "rgb(255, 255, 255)" && (rgbValues[0] > 205 && rgbValues[1] > 205 && rgbValues[2] > 205)) { - rgbValues[0] = 205; - rgbValues[1] = 205; - rgbValues[2] = 205; - - console.warn("Median colour is white, falling back on rgba(205, 205, 205, 0.25)..."); - } - medianColor = "#"; for (let i = 0; i < 3; i++) {