diff options
Diffstat (limited to 'src/plugins/showHiddenChannels/index.tsx')
-rw-r--r-- | src/plugins/showHiddenChannels/index.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 667f710..634b5cd 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -107,13 +107,13 @@ export default definePlugin({ }, { // Prevent Discord from trying to connect to hidden channels - match: /(?=\|\|\i\.default\.selectVoiceChannel\((\i)\.id\))/, - replace: (_, channel) => `||$self.isHiddenChannel(${channel})` + match: /if\(!\i&&!\i(?=.{0,50}?selectVoiceChannel\((\i)\.id\))/, + replace: (m, channel) => `${m}&&!$self.isHiddenChannel(${channel})` }, { // Make Discord show inside the channel if clicking on a hidden or locked channel - match: /(?<=\|\|\i\.default\.selectVoiceChannel\((\i)\.id\);!__OVERLAY__&&\()/, - replace: (_, channel) => `$self.isHiddenChannel(${channel},true)||` + match: /!__OVERLAY__&&\((?<=selectVoiceChannel\((\i)\.id\).+?)/, + replace: (m, channel) => `${m}$self.isHiddenChannel(${channel},true)||` } ] }, @@ -195,7 +195,7 @@ export default definePlugin({ replace: (_, pushNotificationButtonExpression, channel) => `if($self.isHiddenChannel(${channel})){${pushNotificationButtonExpression}break;}` }, { - match: /(?<=renderHeaderToolbar=function.+?case \i\.\i\.GUILD_FORUM:if\(!\i\){)(?=.+?;(.+?{channel:(\i)},"notifications"\)\)))/, + match: /(?<=renderHeaderToolbar=function.+?case \i\.\i\.GUILD_FORUM:.+?if\(!\i\){)(?=.+?;(.+?{channel:(\i)},"notifications"\)\)))/, replace: (_, pushNotificationButtonExpression, channel) => `if($self.isHiddenChannel(${channel})){${pushNotificationButtonExpression};break;}` }, { |