WebContextMenus: Don't include queryparams in filename on save

This commit is contained in:
Vendicated 2023-04-08 22:57:34 +02:00
parent 09e919f0c6
commit 0dee968e98
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

View File

@ -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);