From ec34412100e226f85d7414651bf99b0fffdba972 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 28 Mar 2024 09:48:47 -0300 Subject: [PATCH] Fix store finds --- src/plugins/alwaysTrust/index.ts | 2 +- src/plugins/ignoreActivities/index.tsx | 2 +- src/plugins/noBlockedMessages/index.ts | 4 ++-- src/plugins/showHiddenChannels/index.tsx | 6 +++--- src/plugins/spotifyCrack/index.ts | 2 +- src/plugins/volumeBooster.discordDesktop/index.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/alwaysTrust/index.ts b/src/plugins/alwaysTrust/index.ts index 5113935f4..b195e8ebf 100644 --- a/src/plugins/alwaysTrust/index.ts +++ b/src/plugins/alwaysTrust/index.ts @@ -41,7 +41,7 @@ export default definePlugin({ authors: [Devs.zt, Devs.Trwy], patches: [ { - find: ".displayName=\"MaskedLinkStore\"", + find: '="MaskedLinkStore",', replacement: { match: /(?<=isTrustedDomain\(\i\){)return \i\(\i\)/, replace: "return true" diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index c04ce1c56..5c349a4e7 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -210,7 +210,7 @@ export default definePlugin({ patches: [ { - find: '.displayName="LocalActivityStore"', + find: '="LocalActivityStore",', replacement: [ { match: /HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/, diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index f9de3e13c..8435f1351 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -38,8 +38,8 @@ export default definePlugin({ ] }, ...[ - 'displayName="MessageStore"', - 'displayName="ReadStateStore"' + '="MessageStore",', + '="ReadStateStore",' ].map(find => ({ find, predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true, diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 2d091c24a..9968ef16b 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -191,7 +191,7 @@ export default definePlugin({ }, { // Hide the new version of unreads box for hidden channels - find: '.displayName="ChannelListUnreadsStore"', + find: '="ChannelListUnreadsStore",', replacement: { match: /(?<=if\(null==(\i))(?=.{0,160}?getHasImportantUnread\)\(\i\))/g, // Global because Discord has multiple methods like that in the same module replace: (_, channel) => `||$self.isHiddenChannel(${channel})` @@ -442,7 +442,7 @@ export default definePlugin({ } }, { - find: '.displayName="GuildChannelStore"', + find: '="GuildChannelStore",', replacement: [ { // Make GuildChannelStore contain hidden channels @@ -465,7 +465,7 @@ export default definePlugin({ } }, { - find: '.displayName="NowPlayingViewStore"', + find: '="NowPlayingViewStore",', replacement: { // Make active now voice states on hidden channels match: /(getVoiceStateForUser.{0,150}?)&&\i\.\i\.canWithPartialContext.{0,20}VIEW_CHANNEL.+?}\)(?=\?)/, diff --git a/src/plugins/spotifyCrack/index.ts b/src/plugins/spotifyCrack/index.ts index 5d890349c..1beccad60 100644 --- a/src/plugins/spotifyCrack/index.ts +++ b/src/plugins/spotifyCrack/index.ts @@ -51,7 +51,7 @@ export default definePlugin({ }, }, { - find: '.displayName="SpotifyStore"', + find: '"displayName","SpotifyStore")', replacement: [ { predicate: () => settings.store.noSpotifyAutoPause, diff --git a/src/plugins/volumeBooster.discordDesktop/index.ts b/src/plugins/volumeBooster.discordDesktop/index.ts index 4aca79fc7..b455c97ec 100644 --- a/src/plugins/volumeBooster.discordDesktop/index.ts +++ b/src/plugins/volumeBooster.discordDesktop/index.ts @@ -71,7 +71,7 @@ export default definePlugin({ }, // Prevent the MediaEngineStore from overwriting our LocalVolumes above 200 with the ones the Discord Audio Context Settings sync sends { - find: '.displayName="MediaEngineStore"', + find: '="MediaEngineStore",', replacement: [ { match: /(\.settings\.audioContextSettings.+?)(\i\[\i\])=(\i\.volume)(.+?setLocalVolume\(\i,).+?\)/,