mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-22 12:57:01 -04:00
Fix multiple plugins for latest Discord update (#2911)
Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
1abfb5f0cf
commit
bc59fc41b3
17 changed files with 68 additions and 67 deletions
|
@ -254,11 +254,11 @@ export default definePlugin({
|
|||
},
|
||||
// Allow stickers to be sent everywhere
|
||||
{
|
||||
find: "canUseCustomStickersEverywhere:function",
|
||||
find: "canUseCustomStickersEverywhere:",
|
||||
predicate: () => settings.store.enableStickerBypass,
|
||||
replacement: {
|
||||
match: /canUseCustomStickersEverywhere:function\(\i\){/,
|
||||
replace: "$&return true;"
|
||||
match: /(?<=canUseCustomStickersEverywhere:)\i/,
|
||||
replace: "()=>true"
|
||||
},
|
||||
},
|
||||
// Make stickers always available
|
||||
|
@ -272,15 +272,15 @@ export default definePlugin({
|
|||
},
|
||||
// Allow streaming with high quality
|
||||
{
|
||||
find: "canUseHighVideoUploadQuality:function",
|
||||
find: "canUseHighVideoUploadQuality:",
|
||||
predicate: () => settings.store.enableStreamQualityBypass,
|
||||
replacement: [
|
||||
"canUseHighVideoUploadQuality",
|
||||
"canStreamQuality",
|
||||
].map(func => {
|
||||
return {
|
||||
match: new RegExp(`${func}:function\\(\\i(?:,\\i)?\\){`, "g"),
|
||||
replace: "$&return true;"
|
||||
match: new RegExp(`(?<=${func}:)\\i`, "g"),
|
||||
replace: "()=>true"
|
||||
};
|
||||
})
|
||||
},
|
||||
|
@ -295,10 +295,10 @@ export default definePlugin({
|
|||
},
|
||||
// Allow client themes to be changeable
|
||||
{
|
||||
find: "canUseClientThemes:function",
|
||||
find: "canUseClientThemes:",
|
||||
replacement: {
|
||||
match: /canUseClientThemes:function\(\i\){/,
|
||||
replace: "$&return true;"
|
||||
match: /(?<=canUseClientThemes:)\i/,
|
||||
replace: "()=>true"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -306,8 +306,8 @@ export default definePlugin({
|
|||
replacement: [
|
||||
{
|
||||
// Overwrite incoming connection settings proto with our local settings
|
||||
match: /CONNECTION_OPEN:function\((\i)\){/,
|
||||
replace: (m, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
|
||||
match: /function (\i)\((\i)\){(?=.*CONNECTION_OPEN:\1)/,
|
||||
replace: (m, funcName, props) => `${m}$self.handleProtoChange(${props}.userSettingsProto,${props}.user);`
|
||||
},
|
||||
{
|
||||
// Overwrite non local proto changes with our local settings
|
||||
|
@ -400,10 +400,10 @@ export default definePlugin({
|
|||
},
|
||||
// Allow using custom app icons
|
||||
{
|
||||
find: "canUsePremiumAppIcons:function",
|
||||
find: "canUsePremiumAppIcons:",
|
||||
replacement: {
|
||||
match: /canUsePremiumAppIcons:function\(\i\){/,
|
||||
replace: "$&return true;"
|
||||
match: /(?<=canUsePremiumAppIcons:)\i/,
|
||||
replace: "()=>true"
|
||||
}
|
||||
},
|
||||
// Separate patch for allowing using custom app icons
|
||||
|
@ -424,10 +424,10 @@ export default definePlugin({
|
|||
},
|
||||
// Allow using custom notification sounds
|
||||
{
|
||||
find: "canUseCustomNotificationSounds:function",
|
||||
find: "canUseCustomNotificationSounds:",
|
||||
replacement: {
|
||||
match: /canUseCustomNotificationSounds:function\(\i\){/,
|
||||
replace: "$&return true;"
|
||||
match: /(?<=canUseCustomNotificationSounds:)\i/,
|
||||
replace: "()=>true"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue