diff --git a/src/plugins/webContextMenus.web/index.ts b/src/plugins/webContextMenus.web/index.ts index b9c6a1875..f8c77ab95 100644 --- a/src/plugins/webContextMenus.web/index.ts +++ b/src/plugins/webContextMenus.web/index.ts @@ -143,12 +143,12 @@ export default definePlugin({ replace: "false" }, { - match: /(?<=#{intl::COPY_IMAGE_MENU_ITEM}\),)action:/, - replace: "action:()=>$self.copyImage(arguments[0]),oldAction:" + match: /(#{intl::COPY_IMAGE_MENU_ITEM}\),.{0,75}?)action:/, + replace: "$1action:()=>$self.copyImage(arguments[0]),oldAction:" }, { - match: /(?<=#{intl::SAVE_IMAGE_MENU_ITEM}\),)action:/, - replace: "action:()=>$self.saveImage(arguments[0]),oldAction:" + match: /(#{intl::SAVE_IMAGE_MENU_ITEM}\),.{0,75}?)action:/, + replace: "$1action:()=>$self.saveImage(arguments[0]),oldAction:" }, ] },