Fix BadgesAPI and IrcColors
This commit is contained in:
parent
4391fcc21b
commit
6f5fd5d0b6
2 changed files with 3 additions and 3 deletions
|
@ -73,7 +73,7 @@ export default definePlugin({
|
||||||
find: "#{intl::PROFILE_USER_BADGES}",
|
find: "#{intl::PROFILE_USER_BADGES}",
|
||||||
replacement: [
|
replacement: [
|
||||||
{
|
{
|
||||||
match: /(alt:" ","aria-hidden":!0,src:)(.{0,20}(\i)\.icon\))/,
|
match: /(alt:" ","aria-hidden":!0,src:)(.+?)(?=,)(?<=href:(\i)\.link.+?)/,
|
||||||
replace: (_, rest, originalSrc, badge) => `...${badge}.props,${rest}${badge}.image??(${originalSrc})`
|
replace: (_, rest, originalSrc, badge) => `...${badge}.props,${rest}${badge}.image??(${originalSrc})`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -73,8 +73,8 @@ export default definePlugin({
|
||||||
{
|
{
|
||||||
find: "#{intl::GUILD_OWNER}),children:",
|
find: "#{intl::GUILD_OWNER}),children:",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /(?<=\.MEMBER_LIST}\),\[\]\),)(.+?color:)null!=.{0,50}?(?=,)/,
|
match: /(typingIndicatorRef:.+?},)(\i=.+?)color:null!=.{0,50}?(?=,)/,
|
||||||
replace: (_, rest) => `ircColor=$self.calculateNameColorForListContext(arguments[0]),${rest}ircColor`
|
replace: (_, rest1, rest2) => `${rest1}ircColor=$self.calculateNameColorForListContext(arguments[0]),${rest2}color:ircColor`
|
||||||
},
|
},
|
||||||
predicate: () => settings.store.memberListColors
|
predicate: () => settings.store.memberListColors
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue