diff options
author | Vendicated <vendicated@riseup.net> | 2022-09-29 23:45:15 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-09-29 23:45:15 +0200 |
commit | 9aaa47ea4e9ac068bf5fcbb997e31d722f43f1e5 (patch) | |
tree | d3bf56f163f66e4a77f2025cde913324f3f75c46 /src/plugins | |
parent | 3c2bbb698aaff59965bfeb217db86e628cc6cf90 (diff) | |
download | Vencord-9aaa47ea4e9ac068bf5fcbb997e31d722f43f1e5.tar.gz Vencord-9aaa47ea4e9ac068bf5fcbb997e31d722f43f1e5.tar.bz2 Vencord-9aaa47ea4e9ac068bf5fcbb997e31d722f43f1e5.zip |
BetterGifAltText: Decode url encoded jazz
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/betterGifAltText.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/betterGifAltText.ts b/src/plugins/betterGifAltText.ts index 3e40820..4754042 100644 --- a/src/plugins/betterGifAltText.ts +++ b/src/plugins/betterGifAltText.ts @@ -27,7 +27,11 @@ export default definePlugin({ altify(props: any) { if (props.alt !== "GIF") return; - const url: string = props.original || props.src; + let url: string = props.original || props.src; + try { + url = decodeURI(url); + } catch {} + let name = url .slice(url.lastIndexOf("/") + 1) .replace(/\d/g, "") // strip numbers |