Turtle needs help with a CSS selector to color usernames of staff users and trust level four users in a chat. Arkshine provides a solution using the .is-staff class and suggests creating a group for trust level four users. Arkshine also provides JavaScript code to add missing class names and explains how to target the group using .group--trust_level_4.
Turtle asks how to select a specific username instead of trust level four, and Arkshine updates the code to include the username. However, Turtle has trouble getting it to work for a user called “Kat_Mac”. Arkshine suggests using user--Kat_Mac but Turtle still can’t get it to work.
Eventually, Arkshine provides an alternative solution using [data-user-card="Kat_Mac"], which Turtle confirms works. Arkshine refines this solution, and Turtle thanks them for their help.
Hey,
Since there’s no shield icon or any indication of being a staff user for messages in chat, I wanted to slightly color their usernames. I found the selector but I ran into trouble figuring out a way to select staff users. Here’s what I have right now:
Oh, one more question. What would the thing be for trust level four users?
To clarify, I also would like to do something similar for users with trust level four. I couldn’t find a selector for it.
No, don’t change the JS. If you refer to includeUsersField, it means whether you want to show by “username” (e.g. Kat_Mac) or by “id” (e.g. like 4). If you wish to show the username, leave it as it is.