User:Sirex98/monobook.js
Jump to navigation
Jump to search
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.
The accompanying .css page for this skin can be added at User:Sirex98/monobook.css. |
- Report page listing warnings and errors.
// User:Ais523/topcontrib.js
// This script color-codes lines according to who has the top contribution for a page.
//<pre><nowiki>
$(function () {
if((location.href.indexOf("Special:Contributions")!=-1||
location.href.indexOf("Special%3AContributions")!=-1)
&&location.href.indexOf("&ais523")==-1&&location.href.indexOf("?ais523")==-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>";
}
}
});
//</nowiki></pre>