WebContextMenus: Don't include queryparams in filename on save
This commit is contained in:
parent
09e919f0c6
commit
0dee968e98
@ -193,7 +193,7 @@ export default definePlugin({
|
|||||||
const data = await fetchImage(url);
|
const data = await fetchImage(url);
|
||||||
if (!data) return;
|
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 });
|
const file = new File([data], name, { type: data.type });
|
||||||
|
|
||||||
saveFile(file);
|
saveFile(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user