diff --git a/src/plugins/ignoreActivities.tsx b/src/plugins/ignoreActivities.tsx index 56a0a8db..3d53bbc0 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",