Skip to content

Commit

Permalink
fixed loader
Browse files Browse the repository at this point in the history
  • Loading branch information
hobsRKM committed Nov 30, 2024
1 parent 1ea6846 commit 7c0e649
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions resources/js/skins/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ document.addEventListener('DOMContentLoaded', function () {
});

function applyGlow(img) {
const color = colorThief.getColor(img);
const rgbColor = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
img.closest('.card').style.setProperty('--glow-color', rgbColor);
img.closest('.card').classList.add('glow');
img.previousElementSibling.classList.add('d-none');
try {
const color = colorThief.getColor(img);
const rgbColor = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
img.closest('.card').style.setProperty('--glow-color', rgbColor);
img.closest('.card').classList.add('glow');
img.previousElementSibling.classList.add('d-none');
}
catch (e) {
img.previousElementSibling.classList.add('d-none');
}
}

const skinPreviewModal = document.getElementById('skinPreviewModal');
Expand Down

0 comments on commit 7c0e649

Please sign in to comment.