diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 61c2a6c78..1c63bd41e 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -106,7 +106,7 @@ export default definePlugin({ replacement: [ { // Do not show confirmation to join a voice channel when already connected to another if clicking on a hidden voice channel - match: /(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\);return\()/, + match: /(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\)[^;]+?;return\()/, replace: (_, channel) => `!$self.isHiddenChannel(${channel})&&` }, { @@ -166,7 +166,7 @@ export default definePlugin({ replacement: [ // Make the channel appear as muted if it's hidden { - match: /\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,muted:(\i).+?;)/, + match: /Children\.count.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,muted:(\i).+?;)/, replace: (m, channel, muted) => `${m}${muted}=$self.isHiddenChannel(${channel})?true:${muted};` }, // Add the hidden eye icon if the channel is hidden @@ -176,7 +176,7 @@ export default definePlugin({ }, // Make voice channels also appear as muted if they are muted { - match: /(?<=\.wrapper:\i\.notInteractive,)(.+?)if\((\i)(?:\)return |\?)(\i\.MUTED)/, + match: /(?<=\?\i\.\i:\i\.\i,)(.+?)if\((\i)(?:\)return |\?)(\i\.MUTED)/, replace: (_, otherClasses, isMuted, mutedClassExpression) => `${isMuted}?${mutedClassExpression}:"",${otherClasses}if(${isMuted})return ""` } ] @@ -193,7 +193,7 @@ export default definePlugin({ { // Hide unreads predicate: () => settings.store.hideUnreads === true, - match: /\.subtitle,.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/, + match: /Children\.count.+?;(?=return\(0,\i\.jsxs?\))(?<={channel:(\i),name:\i,.+?unread:(\i).+?)/, replace: (m, channel, unread) => `${m}${unread}=$self.isHiddenChannel(${channel})?false:${unread};` } ] @@ -368,7 +368,7 @@ export default definePlugin({ }, { // Disable bad CSS class which mess up hidden voice channels styling - match: /callContainer,(?<=\i\.callContainer,)/, + match: /(?=\i\|\|\i!==\i\.\i\.FULL_SCREEN)/, replace: '$&!this.props.inCall&&$self.isHiddenChannel(this.props.channel,true)?"":' } ] @@ -408,7 +408,7 @@ export default definePlugin({ }, { // Remove the open chat button for the HiddenChannelLockScreen - match: /(?<=&&)\(0,\i\.jsxs?\).{0,180}\.buttonIcon/, + match: /(?<=onClick:.{0,70}?toggleParticipantsList.{0,150}?\),!\i&&)\(0,\i\.jsxs?\).{0,280}iconClassName/, replace: "!$self.isHiddenChannel(arguments[0]?.channel,true)&&$&" } ] @@ -441,7 +441,7 @@ export default definePlugin({ find: 'className:"channelMention",children', replacement: { // Show inside voice channel instead of trying to join them when clicking on a channel mention - match: /(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/, + match: /(?<=getChannel\(\i\);null!=(\i))(?=.{0,100}?selectVoiceChannel)/, replace: (_, channel) => `&&!$self.isHiddenChannel(${channel})` } }, @@ -461,7 +461,7 @@ export default definePlugin({ ] }, { - find: ".invitesDisabledTooltip", + find: "GuildTooltip - ", replacement: { // Make GuildChannelStore.getChannels return hidden channels match: /(?<=getChannels\(\i)(?=\))/,