RoleColorEverywhere: show role colors in the reactor list (#2490)

Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
programminglaboratorys 2024-06-08 21:56:23 +03:00 committed by Vendicated
parent 62830464af
commit 50c4513737
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -40,9 +40,16 @@ const settings = definePluginSettings({
default: true,
description: "Show role colors in the voice chat user list",
restartNeeded: true
},
reactorsList: {
type: OptionType.BOOLEAN,
default: true,
description: "Show role colors in the reactors list",
restartNeeded: true
}
});
export default definePlugin({
name: "RoleColorEverywhere",
authors: [Devs.KingFish, Devs.lewisakura, Devs.AutumnVN],
@ -99,6 +106,14 @@ export default definePlugin({
}
],
predicate: () => settings.store.voiceUsers,
},
{
find: ".reactorDefault",
replacement: {
match: /\.openUserContextMenu\)\((\i),(\i),\i\).{0,250}tag:"strong"/,
replace: "$&,style:{color:$self.getColor($2?.id,$1)}"
},
predicate: () => settings.store.reactorsList,
}
],
settings,