mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
Fix Patches
This commit is contained in:
parent
608ffa0764
commit
4ad588d918
3 changed files with 2 additions and 18 deletions
|
@ -41,15 +41,6 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
predicate: () => !Settings.plugins.AnonymiseFileNames.enabled,
|
predicate: () => !Settings.plugins.AnonymiseFileNames.enabled,
|
||||||
},
|
},
|
||||||
// Also taken from AnonymiseFileNames
|
|
||||||
{
|
|
||||||
find: 'addFilesTo:"message.attachments"',
|
|
||||||
replacement: {
|
|
||||||
match: /(\i.uploadFiles\((\i),)/,
|
|
||||||
replace: "$2.forEach(f=>f.filename=$self.fixExt(f)),$1",
|
|
||||||
},
|
|
||||||
predicate: () => !Settings.plugins.AnonymiseFileNames.enabled,
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
fixExt(upload: ExtUpload) {
|
fixExt(upload: ExtUpload) {
|
||||||
const file = upload.filename;
|
const file = upload.filename;
|
||||||
|
|
|
@ -85,13 +85,6 @@ export default definePlugin({
|
||||||
replace: "$1.forEach($self.anonymise),$&"
|
replace: "$1.forEach($self.anonymise),$&"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
find: 'addFilesTo:"message.attachments"',
|
|
||||||
replacement: {
|
|
||||||
match: /\i.uploadFiles\((\i),/,
|
|
||||||
replace: "$1.forEach($self.anonymise),$&"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}",
|
find: "#{intl::ATTACHMENT_UTILITIES_SPOILER}",
|
||||||
replacement: {
|
replacement: {
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "Copy image not supported",
|
find: "Copy image not supported",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=(?:canSaveImage|canCopyImage)\(\i?\)\{.{0,50})!\i\.isPlatformEmbedded/g,
|
match: /(?<=(?:canSaveImage|canCopyImage)\((\i,\i)?\)\{.{0,150})!\i\.isPlatformEmbedded/g,
|
||||||
replace: "false"
|
replace: "false"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -147,7 +147,7 @@ export default definePlugin({
|
||||||
replace: "false"
|
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"
|
replace: "return [true"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue