aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3L0C1T13S <51764975+V3L0C1T13S@users.noreply.github.com>2022-12-21 10:12:05 -0500
committerGitHub <noreply@github.com>2022-12-21 16:12:05 +0100
commit1f73cfa91a5a33ad73f3927ec3795a694c26922b (patch)
tree0732f471a16cf790d48dc0c9b1594d3704543027
parent7e6077367a83096149578a062cfe7eb8b0fd3ba3 (diff)
downloadVencord-1f73cfa91a5a33ad73f3927ec3795a694c26922b.tar.gz
Vencord-1f73cfa91a5a33ad73f3927ec3795a694c26922b.tar.bz2
Vencord-1f73cfa91a5a33ad73f3927ec3795a694c26922b.zip
EmoteCloner: Use CDN_HOST variable to support unofficial backends (#356)
-rw-r--r--src/plugins/emoteCloner.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/emoteCloner.tsx b/src/plugins/emoteCloner.tsx
index 36b283e..c22eebd 100644
--- a/src/plugins/emoteCloner.tsx
+++ b/src/plugins/emoteCloner.tsx
@@ -50,7 +50,7 @@ function getGuildCandidates(isAnimated: boolean) {
}
async function doClone(guildId: string, id: string, name: string, isAnimated: boolean) {
- const data = await fetch(`https://cdn.discordapp.com/emojis/${id}.${isAnimated ? "gif" : "png"}`)
+ const data = await fetch(`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${id}.${isAnimated ? "gif" : "png"}`)
.then(r => r.blob());
const reader = new FileReader();
@@ -226,7 +226,7 @@ export default definePlugin({
<img
role="presentation"
aria-hidden
- src={`https://cdn.discordapp.com/emojis/${id}.${isAnimated ? "gif" : "png"}`}
+ src={`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/emojis/${id}.${isAnimated ? "gif" : "png"}`}
alt=""
height={24}
width={24}