Skip to content

Commit

Permalink
Remove obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
linfindel committed Dec 24, 2024
1 parent 915ac62 commit dc001b1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions player.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,22 +724,14 @@ 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;

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++) {
Expand Down

0 comments on commit dc001b1

Please sign in to comment.