mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 09:03:03 -04:00
new plugin MentionAvatars: Shows user avatars inside mentions (#2691)
This commit is contained in:
parent
0057ab42e8
commit
92ae62602b
6 changed files with 75 additions and 33 deletions
|
@ -186,12 +186,10 @@ export default definePlugin({
|
|||
// Avatar component used in User DMs "User Profile" popup in the right and Profiles Modal pfp
|
||||
{
|
||||
find: ".overlay:void 0,status:",
|
||||
replacement: [
|
||||
...[/"PRESS_VIEW_PROFILE".+?(?=children:)(?<=avatarSrc:(\i).+?)/, /avatarSrc:(\i),eventHandlers:(\i).+?"div",{...\2,/].map(match => ({
|
||||
match,
|
||||
replace: "$&style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)},"
|
||||
}))
|
||||
]
|
||||
replacement: {
|
||||
match: /avatarSrc:(\i),eventHandlers:(\i).+?"div",{...\2,/,
|
||||
replace: "$&style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)},"
|
||||
}
|
||||
},
|
||||
// Old Profiles Modal pfp
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue