diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index 3a2072542..2dcf7e9f1 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -17,7 +17,7 @@ const container = findByProps("memberSince"); const getCreatedAtDate = findByCode('month:"short",day:"numeric"'); const locale = findByProps("getLocale"); const lastSection = findByProps("lastSection"); -const section = find((m: any) => m.section !== void 0 && Object.values(m).length === 1); +const section = find((m: any) => m.section !== void 0 && m.heading !== void 0 && Object.values(m).length === 2); export default definePlugin({ name: "FriendsSince", diff --git a/src/plugins/moreUserTags/index.tsx b/src/plugins/moreUserTags/index.tsx index 25b383a90..7127410d4 100644 --- a/src/plugins/moreUserTags/index.tsx +++ b/src/plugins/moreUserTags/index.tsx @@ -257,6 +257,7 @@ export default definePlugin({ // in profiles { find: ",overrideDiscriminator:", + group: true, replacement: [ { // prevent channel id from getting ghosted @@ -264,7 +265,7 @@ export default definePlugin({ match: /user:\i,nick:\i,/, replace: "$&moreTags_channelId," }, { - match: /,botType:(\i\((\i)\)),/g, + match: /,botType:(\i),(?<=user:(\i).+?)/g, replace: ",botType:$self.getTag({user:$2,channelId:moreTags_channelId,origType:$1,location:'not-chat'})," } ] diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index 112f9f755..6ca9bf2d1 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -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 => ({ + 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,7 +212,7 @@ 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: { @@ -210,14 +220,6 @@ export default definePlugin({ 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(?!