From 62c0ad394bc4c1993519b2b041c9e2fa68ca8b04 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:15:44 -0500 Subject: [PATCH 1/2] ExportContacts Temp Patch Update --- src/equicordplugins/exportContacts/index.tsx | 23 ++++++++------------ 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/equicordplugins/exportContacts/index.tsx b/src/equicordplugins/exportContacts/index.tsx index acb5ed5e..a454e432 100644 --- a/src/equicordplugins/exportContacts/index.tsx +++ b/src/equicordplugins/exportContacts/index.tsx @@ -68,20 +68,15 @@ export default definePlugin({ }, { find: "[role=\"tab\"][aria-disabled=\"false\"]", - replacement: [ - { - match: /this\.props;(return\(.*?"aria-label":(\i))/, - replace: "this.props;console.log($2?.Children);$1" - }, - { - match: /("aria-label":(\i),children:)(\w+)\.Children\.map\((\w+),\s*this\.renderChildren\)/, - replace: - "$1($3 && $3.Children ?" + - "($2 === 'Friends' ?" + - "[...$3.Children.map($4, this.renderChildren), $self.addExportButton()]" + - ": [...$3.Children.map($4, this.renderChildren)]) : $3.map($4, this.renderChildren))" - } - ] + replacement: { + match: /("aria-label":(\i).{0,25})(\i)\.Children\.map\((\i),this\.renderChildren\)/, + replace: + "$1($3 && $3.Children" + + "? ($2 === 'Friends'" + + "? [...$3.Children.map($4, this.renderChildren), $self.addExportButton()]" + + ": [...$3.Children.map($4, this.renderChildren)])" + + ": $3.map($4, this.renderChildren))" + } } ], From 2113eec7acdb1c037ba6d3b3801ea4f13989afca Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:41:33 -0500 Subject: [PATCH 2/2] MessagePeek Fix --- src/equicordplugins/messagePeek/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/equicordplugins/messagePeek/index.tsx b/src/equicordplugins/messagePeek/index.tsx index 294a9cf9..ceaa4261 100644 --- a/src/equicordplugins/messagePeek/index.tsx +++ b/src/equicordplugins/messagePeek/index.tsx @@ -41,10 +41,11 @@ export default definePlugin({ replacement: { match: /(?<=children:([^])[^]*)}\);/, replace: `$& + if ($1[0] && $1[0].props && $1[0].props.children) { $1[0].props.children[1].props.children=[ $1[0].props.children[1].props.children, $self.renderMessagePeek({ channel: $1[0].props.children[0].props.channel }) - ];`.replace(/\s+/g, "") + ];};`.replace(/\s+/g, "") }, predicate: () => settings.store.guildChannels === true }