mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 18:37:04 -04:00
Fix everything broken by recent Discord update (#3177)
Co-authored-by: sadan <117494111+sadan4@users.noreply.github.com> Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
parent
cdc756193e
commit
33d4f13a24
41 changed files with 389 additions and 244 deletions
|
@ -108,8 +108,10 @@ export default definePlugin({
|
|||
},
|
||||
{
|
||||
// Prevent Discord from trying to connect to hidden voice channels
|
||||
match: /(?=&&\i\.\i\.selectVoiceChannel\((\i)\.id\))/,
|
||||
replace: (_, channel) => `&&!$self.isHiddenChannel(${channel})`
|
||||
match: /(?=(\|\||&&)\i\.\i\.selectVoiceChannel\((\i)\.id\))/,
|
||||
replace: (_, condition, channel) => condition === "||"
|
||||
? `||$self.isHiddenChannel(${channel})`
|
||||
: `&&!$self.isHiddenChannel(${channel})`
|
||||
},
|
||||
{
|
||||
// Make Discord show inside the channel if clicking on a hidden or locked channel
|
||||
|
@ -122,8 +124,10 @@ export default definePlugin({
|
|||
{
|
||||
find: ".AUDIENCE),{isSubscriptionGated",
|
||||
replacement: {
|
||||
match: /!(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,
|
||||
replace: (m, channel) => `${m}&&!$self.isHiddenChannel(${channel})`
|
||||
match: /(!)?(\i)\.isRoleSubscriptionTemplatePreviewChannel\(\)/,
|
||||
replace: (m, not, channel) => not
|
||||
? `${m}&&!$self.isHiddenChannel(${channel})`
|
||||
: `${m}||$self.isHiddenChannel(${channel})`
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -173,8 +177,10 @@ export default definePlugin({
|
|||
},
|
||||
// Make voice channels also appear as muted if they are muted
|
||||
{
|
||||
match: /(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)\)return (\i\.MUTED);/,
|
||||
replace: (_, otherClasses, isMuted, mutedClassExpression) => `${isMuted}?${mutedClassExpression}:"",${otherClasses}if(${isMuted})return "";`
|
||||
match: /(?<=\.wrapper:\i\.notInteractive,)(.+?)(if\()?(\i)(?:\)return |\?)(\i\.MUTED)/,
|
||||
replace: (_, otherClasses, isIf, isMuted, mutedClassExpression) => isIf
|
||||
? `${isMuted}?${mutedClassExpression}:"",${otherClasses}if(${isMuted})return ""`
|
||||
: `${isMuted}?${mutedClassExpression}:"",${otherClasses}${isMuted}?""`
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -184,8 +190,8 @@ export default definePlugin({
|
|||
{
|
||||
// Make muted channels also appear as unread if hide unreads is false, using the HiddenIconWithMutedStyle and the channel is hidden
|
||||
predicate: () => settings.store.hideUnreads === false && settings.store.showMode === ShowMode.HiddenIconWithMutedStyle,
|
||||
match: /\.LOCKED;if\((?<={channel:(\i).+?)/,
|
||||
replace: (m, channel) => `${m}!$self.isHiddenChannel(${channel})&&`
|
||||
match: /(?<=\.LOCKED(?:;if\(|:))(?<={channel:(\i).+?)/,
|
||||
replace: (_, channel) => `!$self.isHiddenChannel(${channel})&&`
|
||||
},
|
||||
{
|
||||
// Hide unreads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue