MediaWiki:Wikia.js/userRightsIcons.js

Note: After saving, you have to bypass your browser's cache to see the changes.

Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5. Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R. Opera users have to clear their caches through Tools→Preferences Konqueror and Safari users can just click the Reload button. Chrome: press Ctrl+F5 or Shift+F5

// 20:11, November 2, 2012 (UTC)

//

// WRITTEN BY User:Minh // If you use this on your wiki, you assume responsibility for // ensuring compliance with Wikia’s ToU // BEGIN CREATING ADDITIONAL USER RIGHTS ICONS FOR PROFILEMASTHEADS function addMastheadTags { var rights = {}; // BEGIN List of Accounts Given Extra User Rights Icons rights["Hoanganhminh"]                = ["Bureaucrat"] // END List of Accounts Given Extra User Rights Icons // BEGIN Script to Remove Old Rights Icons & Insert New if (wgCanonicalSpecialPageName == "Contributions") { var user = wgPageName.substring(wgPageName.lastIndexOf("/")+1).replace(/_/g," "); } else { var user = wgTitle; } if (typeof rights[user] != "undefined") { // remove old rights $('.UserProfileMasthead .masthead-info span.tag').remove; for( var i=0, len=rights[user].length; i < len; i++) { // add new rights $('' + rights[user][i] +           ' ').appendTo('.masthead-info hgroup'); }    }   // END Script to Remove Old Rights Icons & Insert New }; $(function {  if ($('#UserProfileMasthead')) {     addMastheadTags;   } }); // END CREATING ADDITIONAL USER RIGHTS ICONS FOR PROFILEMASTHEADS