From f9fa5f03ac8d8a33d2d3a178b15bd79b7c1447c0 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Sun, 24 Mar 2024 16:54:09 -0500 Subject: [PATCH] Fix Some Images --- overcomplicatedStatuses.js | 3 +++ pageUpdater.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/overcomplicatedStatuses.js b/overcomplicatedStatuses.js index 217a3a6..8712093 100644 --- a/overcomplicatedStatuses.js +++ b/overcomplicatedStatuses.js @@ -14,6 +14,9 @@ function get_img_url(activity, size = "large_image") { return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length)) } else if (image.includes("spotify")) { return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)) + } else { + console.log(decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png")) + return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png") } } } diff --git a/pageUpdater.js b/pageUpdater.js index 77ee882..04d0478 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -170,8 +170,12 @@ function get_img_url(activity, size = "large_image") { return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length)) } else if (image.includes("spotify")) { return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length)) + } else { + console.log(decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png")) + return decodeURIComponent('https://cdn.discordapp.com/app-assets/' + activity.application_id + "/" + image + ".png") } } + console.log("ehh ehhhhh", activity) } if (!image && size == "large_image") {