Jump to content

User:Bellezzasolo/Scripts/adminhighlighter

From Wikipedia, the free encyclopedia
User script
adminhighlighter.js
WP:NPOVN shows the default colours for all user groups
DescriptionUser rights highlighter - admins and extended confirmed, some PERMs
Author(s)Bellezzasolo
Statusγ Release Candidate 1
Version2.0.0
UpdatedAugust 10, 2022
    (2 years ago)
BrowsersAny modern browser or IE9+
SkinsAll
SourceUser:Bellezzasolo/Scripts/adminhighlighter.js

User highlighter v2.0 (source code) highlights links to admins' userpages, talkpages, or contributions pages in bodyContent (that is, everything but the tabs, personal links at the top of the screen, and sidebar) by giving them a colored background. To install it, add {{subst:js|User:Bellezzasolo/Scripts/adminhighlighter.js}} to your common.js page and clear your cache. It will also highlight template editors, extended confirmed users, page movers, new page patrollers and pending change reviewers.

Custom background color

[edit]

By default, the colored background is a gold color for admins and a pink color for template editors. The default colours correspond to the padlock icons that the user group may edit. To modify it, add

a.userhighlighter_excon.userhighlighter_excon {background-color: #E7E7E7 !important}
a.userhighlighter_pcusr.userhighlighter_pcusr {background-color: #E7E7E7 !important}
a.userhighlighter_ptusr.userhighlighter_ptusr {background-color: #E7E7E7 !important}
a.userhighlighter_pgmvr.userhighlighter_pgmvr {background-color: #E7E7E7 !important}
a.userhighlighter_temop.userhighlighter_temop {background-color: #E7E7E7 !important}
a.userhighlighter_sysop.userhighlighter_sysop {background-color: #E7E7E7 !important}

to your common.css page, where #E7E7E7 is the HTML color code of your desired background color. Note that these should be listed in reverse order of priority - sysop here will override all other highlights.

Additional options

[edit]

If you add the following text to the top of your common.js page

window.ADMINHIGHLIGHT_EXTLINKS = true;

external links to admin user/talk/contributions pages will be highlighted as well (for example, enabling the above option will cause [https://wiki.riteme.site/w/index.php?title=User_talk:Legoktm&diff=577155024&oldid=577151098] to be highlighted).