From 23963f40c2c28beb257c59ef4dca3d4fe2e994b4 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 25 Oct 2023 18:12:09 -0300 Subject: [PATCH] Fix IgnoreActivities --- src/plugins/ignoreActivities/index.tsx | 31 +++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index 6f8e27b3..0b42a8b0 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -90,30 +90,31 @@ export default definePlugin({ find: '.displayName="LocalActivityStore"', replacement: [ { - match: /LISTENING.+?\)\);(?<=(\i)\.push.+?)/, - replace: (m, activities) => `${m}${activities}=${activities}.filter($self.isActivityNotIgnored);` + match: /LISTENING.+?}\),(?<=(\i)\.push.+?)/, + replace: (m, activities) => `${m}${activities}=${activities}.filter($self.isActivityNotIgnored),` } ] }, { find: ".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY", replacement: { - match: /\(\)\.removeGame.+?null(?<=(\i)\?\i=\i\.\i\.Messages\.SETTINGS_GAMES_NOW_PLAYING_STATE.+?=(\i)\.overlay.+?)/, - replace: (m, nowPlaying, props) => `${m},$self.renderToggleGameActivityButton(${props},${nowPlaying})` + match: /\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}\(\),(?<={overlay:\i,.+?=(\i),.+?)(?=!(\i))/, + replace: (m, props, nowPlaying) => `${m}$self.renderToggleGameActivityButton(${props},${nowPlaying}),` } }, { - find: ".Messages.EMBEDDED_ACTIVITIES_DEVELOPER_SHELF_SUBTITLE", - replacement: [ - { - match: /(?<=\(\)\.activityTitleText.+?children:(\i)\.name.*?}\),)/, - replace: (_, props) => `$self.renderToggleActivityButton(${props}),` - }, - { - match: /(?<=\(\)\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/, - replace: (_, props) => `$self.renderToggleActivityButton(${props}),` - } - ] + find: ".activityTitleText,variant", + replacement: { + match: /(?<=\i\.activityTitleText.+?children:(\i)\.name.*?}\),)/, + replace: (_, props) => `$self.renderToggleActivityButton(${props}),` + }, + }, + { + find: ".activityCardDetails,children", + replacement: { + match: /(?<=\i\.activityCardDetails.+?children:(\i\.application)\.name.*?}\),)/, + replace: (_, props) => `$self.renderToggleActivityButton(${props}),` + } } ],