Jump to content

User:Ais523/topcontrib.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ais523 (talk | contribs) at 12:29, 22 September 2006 (first attempt at this script (color-coding contribs according to whether you are top)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// [[User:Ais523/topcontrib.js]]
// This script color-codes lines according to who has the top contribution for a page.
addOnloadHook(function () {
  if(location.href.indexOf("Special:Contributions")!=-1||
     location.href.indexOf("Special%3AContributions")!=-1)
  {
    var i,li;
    li=document.body.getElementsByTagName("li");
    for(i in li)
    {
      if(li[i].getElementsByTagName("strong").count"=0)
        li[i].style.backgroundColor="#EEEEFF";
      else
        li[i].style.backgroundColor="#FFEEEE";
    }
  }
});