User:Pjetter/monobook.js

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
  • Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac);
  • Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5;
  • Konqueror: simply click the Reload button, or press F5;
  • Opera users may need to completely clear their cache in Tools→Preferences.
XEBOrder="A,B,D,C,D1,F,U,S,I1,I2,J1,E,G,Q,W,X,K,L,M,H,O,R,R4,V,J2,N,TL,Y1,Z,AI";
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:MarkS/extraeditbuttons.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// [[User:Dschwen/highlightredirects.js]] - please include this line 
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Dschwen/highlightredirects.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// This script color-codes lines according to who has the top contribution for a page.
//<pre>
$(function () {
  if((location.href.indexOf("Special:Contributions")!=-1||
      location.href.indexOf("Special%3AContributions")!=-1)
     &&location.href.indexOf("&Londenp")==-1&&location.href.indexOf("?Londenp")==-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(++i<li.length)
    {
      var s,t;
      t=li[i].innerHTML.match(/"\/wiki\/([^"]*)"/)[1];
      if(li[i].getElementsByTagName("strong").length>0)
        s="#CCCCFF";
      else
        s="#FFCCCC";
      if(a[t]!=undefined) s=(a[t]=="#CCCCFF"?"#CCFFFF":"#FFFFCC"); else a[t]=s;
      li[i].innerHTML="<SPAN STYLE='background-color:"+s+"'>"+li[i].innerHTML+"</SPAN>";
    }
  }
});
//</pre>