diff options
-rw-r--r-- | src/plugins/webContextMenus.web.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/webContextMenus.web.ts b/src/plugins/webContextMenus.web.ts index e1c9725..6b193e5 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); |