WebContextMenus: Fix restoring Copy & Save Image

This commit is contained in:
Nuckyz 2026-01-26 16:07:33 -03:00
parent 8ecae352fd
commit b9640433c8
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -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:"
},
]
},