From eeec088354f2f7be720b03efc2d2882c7f348af5 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 17 May 2025 12:23:38 -0300 Subject: [PATCH] ShowHiddenChannels: Fix stage channels hidden screen --- src/plugins/showHiddenChannels/index.tsx | 4 ++-- src/webpack/patchWebpack.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 95dee8fd..cd1b19ba 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -392,8 +392,8 @@ export default definePlugin({ replacement: [ { // Render our HiddenChannelLockScreen component instead of the main stage channel component - match: /"124px".+?children:(?<=let \i,{channel:(\i).+?)(?=.{0,20}?}\)}function)/, - replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})?$self.HiddenChannelLockScreen(${channel}):` + match: /screenMessage:(\i)\?.+?children:(?=!\1)(?<=let \i,{channel:(\i).+?)/, + replace: (m, _isPopoutOpen, channel) => `${m}$self.isHiddenChannel(${channel})?$self.HiddenChannelLockScreen(${channel}):` }, { // Disable useless components for the HiddenChannelLockScreen of stage channels diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index 300abbab..d9b35f01 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -106,7 +106,7 @@ define(Function.prototype, "m", { const fileName = stack.match(/\/assets\/(.+?\.js)/)?.[1]; - // Currently, sentry and libDiscore Webpack instances are not meant to be patched. + // Currently, sentry and libdiscore Webpack instances are not meant to be patched. // As an extra measure, take advatange of the fact their files include the names and return early if it's one of them. // Later down we also include other measures to avoid patching them. if (["sentry", "libdiscore"].some(name => fileName?.toLowerCase()?.includes(name))) { @@ -123,7 +123,7 @@ define(Function.prototype, "m", { define(this, "p", { value: bundlePath }); clearTimeout(bundlePathTimeout); - // libDiscore init Webpack instance always returns a constanst string for the js filename of a chunk. + // libdiscore init Webpack instance always returns a constant string for the js filename of a chunk. // In that case, avoid patching this instance, // as it runs before the main Webpack instance and will make the WebpackRequire fallback not work properly, or init an wrongful main WebpackRequire. if (bundlePath !== "/assets/" || /(?:=>|{return)"[^"]/.exec(String(this.u))) {