Skip to content

Commit

Permalink
Update ExportContacts
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinRMC authored Dec 14, 2024
1 parent 8fa9e17 commit 60117dc
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions src/plusplugins/exportContacts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
}
}
],

Expand Down

0 comments on commit 60117dc

Please sign in to comment.