Note: After saving, you have to bypass your browser's cache to see the changes. Internet Explorer: press Ctrl-F5, Mozilla: hold down Shift while clicking Reload (or press Ctrl-Shift-R), Opera/Konqueror: press F5, Safari: hold down Shift + Alt while clicking Reload, Chrome: hold down Shift while clicking Reload.
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User:Cyberpower678/vector.js&action=raw&ctype=text/javascript');
//[[User:ais523/adminrights.js]]
//
// This script highlights bluelinks to admins' userpages or talkpages in bodyContent (that is, everything but the tabs, personal
// links at the top of the screen and sidebar) by giving them a cyan background. Please import this script using importScript,
// rather than copying the code, as the list of admins is hard-coded for performance and if you copy the code the list won't update
// with time (I update it from time to time). You can do this by substing Template:js with this script's name as an argument in your
// monobook.js.
//
// If you want a colour other than cyan, add
// .ais523_adminrights_admin {background-color: #FFFF00 !important}
// (or any other colour code) to your monobook.css file.
 
//Update this list at
//http://en.wikipedia.org/w/index.php?title=Special:Listusers&limit=5000&group=sysop&ais523update=y
var adminrights=new Array();
 
importScript('User:Cyberbot_I/adminrights-admins.js'); //[[User:Ais523/adminrights.js]]
 
//Updating script
$(function(){
  if(location.href=="http://en.wikipedia.org/w/index.php?title=Special:ListUsers&limit=5000&"+
                    "group=sysop&ais523update=y")
  {
    var h=document.getElementById('bodyContent').innerHTML;
    var a=new Array();
    h=h.split(/\< *li *\>/i);
    var i=0;
    while(++i<h.length)
    {
      a[h[i].split(">")[1].split("<")[0]]=h[i].split(/\< *\/ *li *\>/i)[0];
    }
    for(i in a)
    {
      document.write("adminrights['"+
        encodeURIComponent(i).split("\\").join("\\\\").split("'").join("%27")
                             .split("(").join("%28").split(")").join("%29")
                             .split("%21").join("!").split("%2C").join(",")
                             .split("%3A").join(":")+"']=1;<BR/>");
    }
  }
});
 
//Highlighting script. Based on [[User:ais523/highlightmyname.js]].
 
function highlightadmins_inner(n,h) //node, relevant hyperlink fragment
{
  if (n.nodeType!=1||n.tagName.toLowerCase()!="a") return 0; // not an anchor
  if (n.href.indexOf(wgScript+"?title="+h) == -1 &&
      n.href.indexOf(wgArticlePath.split("$1")[0]+h) == -1) return 0; // to the wrong target
  var u=n.href.split(h)[1];
  if(adminrights[u.split("_").join("%20")]==1)
  {
    n.style.backgroundColor="#00FFFF";
    if(n.className==null||n.className=="") n.className="ais523_adminrights_admin";
    else n.className+=" ais523_adminrights_admin";
  }
  return 1;
}
 
function highlightadmins(n) //node
{
  while(n!=null)
  {
    if(highlightadmins_inner(n,"User:")) n=n.nextSibling;
    else if(highlightadmins_inner(n,"User_talk:")) n=n.nextSibling;
    else if(highlightadmins_inner(n,"Special:Contributions:")) n=n.nextSibling;
    else
    {
      if(n.firstChild!=null) highlightadmins(n.firstChild);
      n=n.nextSibling;
    }
  }
}
 
$(function() {
  if(location.href.indexOf("?ais523")==-1&&location.href.indexOf("&ais523")==-1&&
     location.href.indexOf("?action=edit")==-1&&location.href.indexOf("?action=submit")==-1&&
     location.href.indexOf("&action=edit")==-1&&location.href.indexOf("&action=submit")==-1&&
     wgPageName!="Special:Preferences")
  {
    highlightadmins(document.getElementById('bodyContent'));
  }
});
 
//[[Category:Wikipedia scripts]]