mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-07 05:42:55 -04:00
parent
608ffa0764
commit
c4e3b0b116
3 changed files with 8 additions and 8 deletions
|
@ -43,10 +43,10 @@ export default definePlugin({
|
|||
},
|
||||
// Also taken from AnonymiseFileNames
|
||||
{
|
||||
find: 'addFilesTo:"message.attachments"',
|
||||
find: "FirstThreadMessage,options",
|
||||
replacement: {
|
||||
match: /(\i.uploadFiles\((\i),)/,
|
||||
replace: "$2.forEach(f=>f.filename=$self.fixExt(f)),$1",
|
||||
match: /\i.uploadFilesSimple\((\i)\);/,
|
||||
replace: "$&$1.forEach($self.fixExt);",
|
||||
},
|
||||
predicate: () => !Settings.plugins.AnonymiseFileNames.enabled,
|
||||
}
|
||||
|
|
|
@ -86,10 +86,10 @@ export default definePlugin({
|
|||
},
|
||||
},
|
||||
{
|
||||
find: 'addFilesTo:"message.attachments"',
|
||||
find: "FirstThreadMessage,options",
|
||||
replacement: {
|
||||
match: /\i.uploadFiles\((\i),/,
|
||||
replace: "$1.forEach($self.anonymise),$&"
|
||||
match: /\i.uploadFilesSimple\((\i)\);/,
|
||||
replace: "$&$1.forEach($self.anonymise);"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -133,7 +133,7 @@ export default definePlugin({
|
|||
{
|
||||
find: "Copy image not supported",
|
||||
replacement: {
|
||||
match: /(?<=(?:canSaveImage|canCopyImage)\(\i?\)\{.{0,50})!\i\.isPlatformEmbedded/g,
|
||||
match: /(?<=(?:canSaveImage|canCopyImage)\((\i,\i)?\)\{.{0,150})!\i\.isPlatformEmbedded/g,
|
||||
replace: "false"
|
||||
}
|
||||
},
|
||||
|
@ -147,7 +147,7 @@ export default definePlugin({
|
|||
replace: "false"
|
||||
},
|
||||
{
|
||||
match: /return\s*?\[.{0,50}?(?=\?.{0,100}?id:"copy-image")/,
|
||||
match: /return\s*?\[.{0,50}?(?=\?.{0,25}?id:"copy-image")/,
|
||||
replace: "return [true"
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue