FIX #63 cross origin issue when picking color from ad

This commit is contained in:
Julien 2021-10-12 00:35:39 +02:00 committed by GitHub
parent d89601aff0
commit fcd3bff9f6
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) Spicetify.Player.addEventListener("songchange", songchange)
function pickCoverColor(img) { function pickCoverColor(img) {
img.setAttribute('crossOrigin', '')
var swatches = new Vibrant(img, 5).swatches() var swatches = new Vibrant(img, 5).swatches()
lightCols = ["Vibrant", "DarkVibrant", "Muted", "LightVibrant"] lightCols = ["Vibrant", "DarkVibrant", "Muted", "LightVibrant"]
darkCols = ["Vibrant", "LightVibrant", "Muted", "DarkVibrant"] darkCols = ["Vibrant", "LightVibrant", "Muted", "DarkVibrant"]