Merge pull request #66 from JulienMaille/JulienMaille-patch-2

FIX #63 cross origin issue when picking color from ad
This commit is contained in:
Julien 2021-10-12 00:35:57 +02:00 committed by GitHub
commit 25e69123de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -342,6 +342,7 @@ async function songchange() {
Spicetify.Player.addEventListener("songchange", songchange)
function pickCoverColor(img) {
img.setAttribute('crossOrigin', '')
var swatches = new Vibrant(img, 5).swatches()
lightCols = ["Vibrant", "DarkVibrant", "Muted", "LightVibrant"]
darkCols = ["Vibrant", "LightVibrant", "Muted", "DarkVibrant"]