-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
18 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,14 +183,24 @@ export default definePlugin({ | |
}, | ||
|
||
patches: [ | ||
// Profiles Modal pfp | ||
...[".MODAL,hasProfileEffect", ".FULL_SIZE,hasProfileEffect:"].map(find => ({ | ||
find, | ||
// 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 => ({ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
moxie-coder
Contributor
|
||
match, | ||
replace: "$&style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)}," | ||
})) | ||
] | ||
}, | ||
// Old Profiles Modal pfp | ||
{ | ||
find: ".MODAL,hasProfileEffect", | ||
replacement: { | ||
match: /\{src:(\i)(?=,avatarDecoration)/, | ||
replace: "{src:$1,onClick:()=>$self.openImage($1)" | ||
} | ||
})), | ||
}, | ||
// Banners | ||
...[".NITRO_BANNER,", "=!1,canUsePremiumCustomization:"].map(find => ({ | ||
find, | ||
|
@@ -202,22 +212,14 @@ export default definePlugin({ | |
'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,' | ||
} | ||
})), | ||
// User DMs "User Profile" popup in the right | ||
// Old User DMs "User Profile" popup in the right | ||
{ | ||
find: ".avatarPositionPanel", | ||
replacement: { | ||
match: /(avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/, | ||
replace: "$1style:($2)?{cursor:\"pointer\"}:{},onClick:$2?()=>{$self.openImage($3)}" | ||
} | ||
}, | ||
{ | ||
find: ".canUsePremiumProfileCustomization,{avatarSrc:", | ||
replacement: { | ||
match: /\.avatar,\i\.clickable\),onClick:\i,(?<=avatarSrc:(\i).+?)/, | ||
replace: "$&style:{cursor:\"pointer\"},onClick:()=>{$self.openImage($1)}," | ||
|
||
} | ||
}, | ||
// Group DMs top small & large icon | ||
{ | ||
find: /\.recipients\.length>=2(?!<isMultiUserDM.{0,50})/, | ||
|
press view profile patch also blocks open profile from small profile popout, maybe we should drop it
the patch for dm profile avatar was added by me because i didnt know new profile makes it clickale to open profile lol, i thought it still does nothing, like old profile