From 0dee968e980f2626715df5db7a9269c3c5098f72 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 8 Apr 2023 22:57:34 +0200 Subject: [PATCH] WebContextMenus: Don't include queryparams in filename on save --- src/plugins/webContextMenus.web.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/webContextMenus.web.ts b/src/plugins/webContextMenus.web.ts index e1c9725d..6b193e59 100644 --- a/src/plugins/webContextMenus.web.ts +++ b/src/plugins/webContextMenus.web.ts @@ -193,7 +193,7 @@ export default definePlugin({ const data = await fetchImage(url); if (!data) return; - const name = url.split("/").pop()!; + const name = new URL(url).pathname.split("/").pop()!; const file = new File([data], name, { type: data.type }); saveFile(file);