decode the god damn url components !!!
This commit is contained in:
parent
90a430cc48
commit
8856835be4
1 changed files with 3 additions and 3 deletions
6
index.js
6
index.js
|
@ -99,11 +99,11 @@ function pageUpdate() {
|
||||||
}
|
}
|
||||||
if (image) {
|
if (image) {
|
||||||
if (image.includes("https/")) {
|
if (image.includes("https/")) {
|
||||||
return 'https://' + image.substr(image.indexOf('https/') + 6, image.length)
|
return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length))
|
||||||
} else if (image.includes("spotify")) {
|
} else if (image.includes("spotify")) {
|
||||||
return 'https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)
|
return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length))
|
||||||
} else {
|
} else {
|
||||||
return `https://cdn.discordapp.com/app-assets/${activity.application_id}/${image}.png`
|
return decodeURIComponent(`https://cdn.discordapp.com/app-assets/${activity.application_id}/${image}.png`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue