diff options
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 |