diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-03-05 20:12:52 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-06 00:12:52 +0100 |
commit | 95db6c32a38b946abf90ebce165de82681159d68 (patch) | |
tree | 16e85f3c0679d1004f40d029aa0a2ff5a12afb02 | |
parent | bed5e98bb03a2c7073f9f421a396fa7616d56ac5 (diff) | |
download | Vencord-95db6c32a38b946abf90ebce165de82681159d68.tar.gz Vencord-95db6c32a38b946abf90ebce165de82681159d68.tar.bz2 Vencord-95db6c32a38b946abf90ebce165de82681159d68.zip |
Fix Ignore Activities button on platforms different than Windows (#528)
Co-authored-by: Ven <vendicated@riseup.net>
-rw-r--r-- | src/plugins/ignoreActivities.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
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 .=(?<props>.)\.overlay.+?"aria-label":.\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}}\)/, - replace: "$&,$self.renderToggleGameActivityButton($<props>)" + 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", |