mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-14 14:10:26 -04:00
Merge branch 'dev'
This commit is contained in:
commit
8b2f432a24
2 changed files with 11 additions and 15 deletions
|
@ -68,20 +68,15 @@ export default definePlugin({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
find: "[role=\"tab\"][aria-disabled=\"false\"]",
|
find: "[role=\"tab\"][aria-disabled=\"false\"]",
|
||||||
replacement: [
|
replacement: {
|
||||||
{
|
match: /("aria-label":(\i).{0,25})(\i)\.Children\.map\((\i),this\.renderChildren\)/,
|
||||||
match: /this\.props;(return\(.*?"aria-label":(\i))/,
|
replace:
|
||||||
replace: "this.props;console.log($2?.Children);$1"
|
"$1($3 && $3.Children" +
|
||||||
},
|
"? ($2 === 'Friends'" +
|
||||||
{
|
"? [...$3.Children.map($4, this.renderChildren), $self.addExportButton()]" +
|
||||||
match: /("aria-label":(\i),children:)(\w+)\.Children\.map\((\w+),\s*this\.renderChildren\)/,
|
": [...$3.Children.map($4, this.renderChildren)])" +
|
||||||
replace:
|
": $3.map($4, this.renderChildren))"
|
||||||
"$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))"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -41,10 +41,11 @@ export default definePlugin({
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=children:([^])[^]*)}\);/,
|
match: /(?<=children:([^])[^]*)}\);/,
|
||||||
replace: `$&
|
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=[
|
||||||
$1[0].props.children[1].props.children,
|
$1[0].props.children[1].props.children,
|
||||||
$self.renderMessagePeek({ channel: $1[0].props.children[0].props.channel })
|
$self.renderMessagePeek({ channel: $1[0].props.children[0].props.channel })
|
||||||
];`.replace(/\s+/g, "")
|
];};`.replace(/\s+/g, "")
|
||||||
},
|
},
|
||||||
predicate: () => settings.store.guildChannels === true
|
predicate: () => settings.store.guildChannels === true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue