diff --git a/src/plugins/showMeYourName/index.tsx b/src/plugins/showMeYourName/index.tsx index ed4ec4d2c..03fc77cd9 100644 --- a/src/plugins/showMeYourName/index.tsx +++ b/src/plugins/showMeYourName/index.tsx @@ -1075,7 +1075,7 @@ export default definePlugin({ replacement: [ { // Replace names in messages and replies. - match: /(?<=colorString:(\i),colorStrings:(\i).{0,900}?)style:\i\(\),(onClick:\i,onContextMenu:\i,children:)(.{0,250}?),"data-text":(\i\+\i)/, + match: /(?<=colorString:(\i),colorStrings:(\i).{0,900}?)style:.{0,120}?,(onClick:\i,onContextMenu:\i,children:)(.{0,250}?),"data-text":(\i\+\i)/, replace: "$3$self.getMessageNameElement({...arguments[0],colorString:$1,colorStrings:$2})??($4),\"data-text\":$self.getMessageNameText(arguments[0])??($5)" }, { @@ -1103,10 +1103,19 @@ export default definePlugin({ }, { // Replace names in the friends list. + find: "hasUniqueUsername()}),usernameClass", + replacement: { + match: /(?<=nick:)(\i)/, + replace: "$self.getTypingMemberListProfilesReactionsVoiceNameText({user:arguments[0].user,type:\"membersList\"})??$1" + }, + }, + { + // Don't block name style in friends list just + // because the name is the same as the username. find: "location:\"DiscordTag\"});", replacement: { - match: /(?<=let{user:(\i).{0,800},{(?:primary|name):)(\i)/g, - replace: "window.location.pathname===\"/channels/@me\"?$self.getTypingMemberListProfilesReactionsVoiceNameText({user:$1,type:\"membersList\"}):$2" + match: /(?<=forceUsername:(\i),.{0,550}?displayNameStyles:)\i!==\i\?(\i.displayNameStyles):null/, + replace: "!$1?$2:null" }, }, {