aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNuckyz <61953774+Nuckyz@users.noreply.github.com>2023-06-28 00:45:16 -0300
committerGitHub <noreply@github.com>2023-06-28 03:45:16 +0000
commitcb980a1cadc3eeb6b69e62821be951764dd5c806 (patch)
tree92c118d9bd21b5f5359a3eadbcf57bdf01a067f9 /src
parent69b10c1f074c8b74c2ee83999eef53ab2bab8fa7 (diff)
downloadVencord-cb980a1cadc3eeb6b69e62821be951764dd5c806.tar.gz
Vencord-cb980a1cadc3eeb6b69e62821be951764dd5c806.tar.bz2
Vencord-cb980a1cadc3eeb6b69e62821be951764dd5c806.zip
Fix broken SHC patches (#1360)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/showHiddenChannels/index.tsx19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx
index 64500c4..1aa484a 100644
--- a/src/plugins/showHiddenChannels/index.tsx
+++ b/src/plugins/showHiddenChannels/index.tsx
@@ -342,32 +342,27 @@ export default definePlugin({
]
},
{
- find: "Guild voice channel without guild id.",
+ find: "useNotificationSettingsItem: channel cannot be undefined",
replacement: [
{
// Render our HiddenChannelLockScreen component instead of the main stage channel component
- match: /Guild voice channel without guild id.+?children:(?<=(\i)\.getGuildId\(\).+?)(?=.{0,20}?}\)}function)/,
+ match: /"124px".+?children:(?<=var (\i)=\i\.channel.+?)(?=.{0,20}?}\)}function)/,
replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})?$self.HiddenChannelLockScreen(${channel}):`
},
{
// Disable useless components for the HiddenChannelLockScreen of stage channels
- match: /render(?!Header).{0,30}?:(?<=(\i)\.getGuildId\(\).+?Guild voice channel without guild id.+?)/g,
+ match: /render(?:BottomLeft|BottomCenter|BottomRight|ChatToasts):(?<=var (\i)=\i\.channel.+?)/g,
replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})?null:`
},
- // Prevent Discord from replacing our route if we aren't connected to the stage channel
- {
- match: /(?=!\i&&!\i&&!\i.{0,80}?(\i)\.getGuildId\(\).{0,50}?Guild voice channel without guild id)(?<=if\()/,
- replace: (_, channel) => `!$self.isHiddenChannel(${channel})&&`
- },
{
// Disable gradients for the HiddenChannelLockScreen of stage channels
- match: /Guild voice channel without guild id.+?disableGradients:(?<=(\i)\.getGuildId\(\).+?)/,
+ match: /"124px".+?disableGradients:(?<=(\i)\.getGuildId\(\).+?)/,
replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})||`
},
{
// Disable strange styles applied to the header for the HiddenChannelLockScreen of stage channels
- match: /Guild voice channel without guild id.+?style:(?<=(\i)\.getGuildId\(\).+?)/,
- replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})?undefined:`
+ match: /"124px".+?style:(?<=(\i)\.getGuildId\(\).+?)/,
+ replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})?void 0:`
},
{
// Remove the divider and amount of users in stage channel components for the HiddenChannelLockScreen
@@ -376,7 +371,7 @@ export default definePlugin({
},
{
// Remove the open chat button for the HiddenChannelLockScreen
- match: /"recents".+?null,(?=.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,
+ match: /"recents".+?&&(?=\(.+?channelId:(\i)\.id,showRequestToSpeakSidebar)/,
replace: (m, channel) => `${m}!$self.isHiddenChannel(${channel})&&`
}
],