User:Ais523/highlightmyname2

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Example of a history page with username highlighting and admin name highlighting. It works in talkpages, too!

Documentation for User:ais523/highlightmyname2.js:

To install, add this to your monobook.js or vector.js (click Special:Mypage/skin.js and paste this text into a new line):

{{subst:js|User:ais523/highlightmyname2.js}}
Change the word highlighted

To highlight a different name (e.g. I highlight "ais523" on my account "ais523 non-admin"), add this into a new line, below the one you created above:

hmn2username="differentname";

(or whatever name you happen to want).

Change the Color or style

To highlight with a different color or style (default: red background), add this text to your monobook.css or vector.css (click Special:Mypage/skin.css and paste this text into a new line):

span.ais523hmn {background-color:#FF9900 !important}

(or whatever css styling you want)

  • E.g. For a orange background color you might use: {background-color:#FF9900 !important}
  • E.g. For a green background color you might use: {background-color:#82D9AD !important}
  • E.g. For an orange text color you might use: {color:#FF9900 !important; background-color:inherit !important;}

(See X11 color names for other Hex color codes)


CSS Notes
  1. Note: You'll need the !important code in order to override the background-color
  2. Note: Leave the "ais523" as "ais523", don't substitute your own name.


Cross-wiki usage

You can use this script at any wiki, just by creating a /common.js page there with a line of code. See example.