SMYN: Actual final fix this time for real I promise I tested it fully. (#804)
* Actual fix this time. * Actual actual fix this time. * Fix patch.
This commit is contained in:
parent
0cdcb24060
commit
af83c84bb0
1 changed files with 12 additions and 3 deletions
|
|
@ -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"
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue