mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 05:42:55 -04:00
WebContextMenus: Fix copying and saving images (#3459)
This commit is contained in:
parent
0e90bda3c7
commit
db0bcf7da3
1 changed files with 11 additions and 5 deletions
|
@ -122,10 +122,16 @@ export default definePlugin({
|
|||
|
||||
{
|
||||
find: "Copy image not supported",
|
||||
replacement: {
|
||||
match: /(?<=(?:canSaveImage|canCopyImage)\(\i?\)\{.{0,50})!\i\.isPlatformEmbedded/g,
|
||||
replace: "false"
|
||||
}
|
||||
replacement: [
|
||||
{
|
||||
match: /(?<=(?:canSaveImage|canCopyImage)\(.{0,120}?)!\i\.isPlatformEmbedded/g,
|
||||
replace: "false"
|
||||
},
|
||||
{
|
||||
match: /canCopyImage\(.+?(?=return"function"==typeof \i\.clipboard\.copyImage)/,
|
||||
replace: "$&return true;"
|
||||
}
|
||||
]
|
||||
},
|
||||
// Add back Copy & Save Image
|
||||
{
|
||||
|
@ -137,7 +143,7 @@ export default definePlugin({
|
|||
replace: "false"
|
||||
},
|
||||
{
|
||||
match: /return\s*?\[.{0,50}?(?=\?.{0,100}?id:"copy-image")/,
|
||||
match: /return\s*?\[.{0,50}?(?=\?\(0,\i\.jsxs?.{0,100}?id:"copy-image")/,
|
||||
replace: "return [true"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue