User:Bellezzasolo/Scripts/adminhighlighter
{{infobox user script
| name = adminhighlighter.js
| desc = User rights highlighter - admins and extended confirmed, some PERMs
| author = {{u|Bellezzasolo}}
| status = γ Release Candidate 1
| version = 2.0.0
| mainsource = User:Bellezzasolo/Scripts/adminhighlighter.js
| skins = All
| browsers = Any modern browser or IE9+
| screenshot = User Highlighter v2.0.png
| screenshot-caption = WP:NPOVN shows the default colours for all user groups
| styled = yes
}}
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.
Custom background color
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
:{{code|a.userhighlighter_excon.userhighlighter_excon {background-color: #E7E7E7 !important}|lang=css}}
:{{code|a.userhighlighter_pcusr.userhighlighter_pcusr {background-color: #E7E7E7 !important}|lang=css}}
:{{code|a.userhighlighter_ptusr.userhighlighter_ptusr {background-color: #E7E7E7 !important}|lang=css}}
:{{code|a.userhighlighter_pgmvr.userhighlighter_pgmvr {background-color: #E7E7E7 !important}|lang=css}}
:{{code|a.userhighlighter_temop.userhighlighter_temop {background-color: #E7E7E7 !important}|lang=css}}
:{{code|a.userhighlighter_sysop.userhighlighter_sysop {background-color: #E7E7E7 !important}|lang=css}}
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
If you add the following text to the top of your common.js page
:{{code|1=window.ADMINHIGHLIGHT_EXTLINKS = true;|lang=javascript}}
external links to admin user/talk/contributions pages will be highlighted as well (for example, enabling the above option will cause
to be highlighted).