add Mutual Groups to new profiles

This commit is contained in:
Vendicated 2024-06-26 17:10:48 +02:00
parent 7f1ccef383
commit 705da29df5
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -58,6 +58,19 @@ export default definePlugin({
match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/, match: /(?<={user:(\i),onClose:(\i)}\);)(?=case \i\.\i\.MUTUAL_FRIENDS)/,
replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs({user: $1, onClose: $2});" replace: "case \"MUTUAL_GDMS\":return $self.renderMutualGDMs({user: $1, onClose: $2});"
} }
},
{
find: ".USER_INFO,subsection:",
replacement: [
{
match: /(?<=onItemSelect:\i,children:)(\i)\.map/,
replace: "[...$1, {section:'MUTUAL_GDMS',text:'Mutual Groups'}].map"
},
{
match: /\(0,\i\.jsx\)\(\i,\{items:\i,section:(\i)/,
replace: "$1==='MUTUAL_GDMS'?$self.renderMutualGDMs(arguments[0]):$&"
}
]
} }
], ],