From 95db6c32a38b946abf90ebce165de82681159d68 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 5 Mar 2023 20:12:52 -0300 Subject: Fix Ignore Activities button on platforms different than Windows (#528) Co-authored-by: Ven --- src/plugins/ignoreActivities.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/ignoreActivities.tsx b/src/plugins/ignoreActivities.tsx index 56a0a8d..3d53bbc 100644 --- a/src/plugins/ignoreActivities.tsx +++ b/src/plugins/ignoreActivities.tsx @@ -145,8 +145,11 @@ export default definePlugin({ patches: [{ find: ".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY", replacement: { - match: /var .=(?.)\.overlay.+?"aria-label":.\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}}\)/, - replace: "$&,$self.renderToggleGameActivityButton($)" + match: /!(\i)\|\|(null==\i\)return null;var \i=(\i)\.overlay.+?children:)(\[.{0,70}overlayStatusText.+?\])(?=}\)}\(\))/, + replace: (_, platformCheck, restWithoutPlatformCheck, props, children) => "" + + `${restWithoutPlatformCheck}` + + `(${platformCheck}?${children}:[])` + + `.concat(Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton(${props}))` } }, { find: ".overlayBadge", -- cgit