From 94a4157c0d275a0fc905ddd394a3d49dcd5bfb1b Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 7 Oct 2025 14:04:04 -0400 Subject: [PATCH] EquicordHelper: Remove Activity Section --- src/equicordplugins/equicordHelper/index.tsx | 23 +++++++++++++++---- .../newPluginsManager/knownSettings.ts | 4 +++- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/equicordplugins/equicordHelper/index.tsx b/src/equicordplugins/equicordHelper/index.tsx index 596d3a921..3c99b5c78 100644 --- a/src/equicordplugins/equicordHelper/index.tsx +++ b/src/equicordplugins/equicordHelper/index.tsx @@ -31,6 +31,11 @@ const settings = definePluginSettings({ description: "Prevents the camera from being mirrored on your screen", default: false, }, + removeActivitySection: { + type: OptionType.BOOLEAN, + description: "Removes the activity section above member list", + default: false, + } }); export default definePlugin({ @@ -57,38 +62,40 @@ export default definePlugin({ // Disable Giant Create DM Button { find: ".createDMButtonContainer,", + predicate: () => settings.store.disableCreateDMButton, replacement: { match: /"create-dm"\)/, replace: "$&&&false" }, - predicate: () => settings.store.disableCreateDMButton }, // Remove DM Context Menu { find: "#{intl::d+e27u::raw}", + predicate: () => settings.store.disableDMContextMenu, + replacement: { match: /\{dotsInsteadOfCloseButton:(\i),rearrangeContextMenu:(\i).*?autoTrackExposure:!0\}\)/, replace: "$1=false,$2=false" }, - predicate: () => settings.store.disableDMContextMenu }, // When focused on voice channel or group chat voice call { find: /\i\?\i.\i.SELF_VIDEO/, + predicate: () => settings.store.noMirroredCamera, replacement: { match: /mirror:\i/, replace: "mirror:!1" }, - predicate: () => settings.store.noMirroredCamera }, // Popout camera when not focused on voice channel { find: ".mirror]:", + all: true, + predicate: () => settings.store.noMirroredCamera, replacement: { match: /\[(\i).mirror]:\i/, replace: "[$1.mirror]:!1" }, - predicate: () => settings.store.noMirroredCamera }, // Overriding css on Preview Camera/Change Video Background popup { @@ -98,6 +105,14 @@ export default definePlugin({ replace: "$&style:{transform: \"scalex(1)\"}," }, predicate: () => settings.store.noMirroredCamera + }, + { + find: ".MEMBERLIST_CONTENT_FEED_TOGGLED,", + predicate: () => settings.store.removeActivitySection, + replacement: { + match: /null==\i\|\|/, + replace: "true||$&" + }, } ], renderMessageAccessory(props) { diff --git a/src/equicordplugins/newPluginsManager/knownSettings.ts b/src/equicordplugins/newPluginsManager/knownSettings.ts index 018acdc87..b645651dc 100644 --- a/src/equicordplugins/newPluginsManager/knownSettings.ts +++ b/src/equicordplugins/newPluginsManager/knownSettings.ts @@ -37,7 +37,9 @@ export async function getKnownSettings(): Promise>> { ([plugin, settings]) => [plugin, [...settings]] )); } else { - map = new Map(raw.map(([plugin, settings]: [string, string[]]) => [plugin, new Set(settings)])); + map = raw instanceof Map + ? raw + : new Map(raw.map(([plugin, settings]: [string, string[]]) => [plugin, new Set(settings)])); } return map;