Description | Highlights users based on groups and blocks. |
---|---|
Author(s) | Daniel Quinlan |
Status | Beta |
Updated | 26 June 2025 |
Browsers | Firefox, Safari, Chrome |
Skins | Vector |
Source | UserHighlighter.js |
The UserHighlighter script visually highlights Wikipedia usernames based on user groups and block status.
To install the UserHighlighter script, follow these steps:
Alternatively, you can manually install it by adding the following code to your common.js file:
{{subst:iusc|User:Daniel Quinlan/Scripts/UserHighlighter.js}}
To customize UserHighlighter, click on User highlighter options in the tools menu on your common.css page. You can enable or disable user groups, enter custom labels for each enabled group, and you can turn off the default stylesheet to use your own custom CSS styling.
User status | Light mode | Dark mode |
---|---|---|
Extended confirmed | Example | Example |
Administrator | Example | Example |
Bot | Example | Example |
Partial block | Example | Example |
Temporary block | Example | Example |
Indefinite block | Example | Example |
You can customize the highlighting by either supplementing the default stylesheet or disabling it entirely. The default stylesheet is located at User:Daniel Quinlan/Scripts/UserHighlighter.css. Any additional styles, including those for user groups not covered by the default, can be added to your common.css page or a skin-specific stylesheet such as vector.css.
Each class name is the group name prefixed with uh-
, as listed on Special:ListGroupRights. Make sure the group name is enabled in the configuration if you're trying to use it.
Generally, color
works well for dark mode, while background-color
is more suitable for light mode. Here's an example of styling the bureaucrat user group with gold text:
/* custom color for bureaucrat group */
a.uh-bureaucrat {
color: #b5b506;
}
Blocks and user groups are cached locally for one hour. Extended-confirmed users have a cache duration of three hours, and administrators have a cache duration of 24 hours. To force an early refresh of cached data, visit the user's profile page, their talk page, or their contributions page.
This script is originally based on User:Novem Linguae/Scripts/UserHighlighterSimple.js although it has been comprehensively rewritten, so any issues should be attributed to me. That script was based on User:Chlod/Scripts/UserHighlighter.js, which was based on User:Pythoncoder/Scripts/userHighlighter.js, which was based on User:Amalthea/userhighlighter.js, ultimately originating from User:Ais523/adminrights.js. Thanks to all the previous authors for their work!