User:Jerry/topcontrib.js

// User:Jerry/topcontrib.js

// This script color-codes lines according to who has the top contribution for a page. // $(function  {  if((location.href.indexOf("Special:Contributions")!=-1||      location.href.indexOf("Special%3AContributions")!=-1) &&location.href.indexOf("&Jerry")==-1&&location.href.indexOf("?Jerry")==-1) {    var i,li,a;    li=document.getElementById("bodyContent");    //li.getElementsByTagName("ul")[0].tagName="ol";    li=li.getElementsByTagName("li");    i=-1;    a=new Array;    while(++i0)        s="#CCCCFF";      else        s="#FFCCCC";      if(a[t]!=undefined) s=(a[t]=="#CCCCFF"?"#CCFFFF":"#FFFFCC"); else a[t]=s;      li[i].innerHTML=""+li[i].innerHTML+"";    }  } }); //  //