User:The Goblin/monobook.js
From Homestar Runner Wiki
< User:The Goblin
Revision as of 03:29, 26 November 2007 by The Goblin (Talk | contribs)
Note: After saving, you may have to bypass your browser's cache to see the changes.
- Mozilla / Firefox: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac)
- Safari: press Cmd-Option-E
- IE: 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.
// include utility functions
document.write('<script type="text/javascript" src="/index.php?title=User:Phlip/utilities.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
function addValidatorLink()
{
utilities.addMonobookTab("http://validator.w3.org/check?uri=" + escape(utilities.getArticleURL()), "Validate", true)
utilities.addMonobookTab("http://www.hrwiki.org/index.php?title=" + utilities.getArticleFullTitle() + "&action=edit§ion=0", "0", true)
utilities.addMonobookTab("http://www.hrwiki.org/index.php?title=" + utilities.getArticleFullTitle() + "&action=purge", "purge", true)
}
addOnloadHook(addValidatorLink);
addOnloadHook(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>";
}
}
});
function addtoolboxlinks() {
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
addlilink(tb, '/index.php/Other_Character_Email_Tampo', 'Tampo Email', '');
addlilink(tb, '/index.php/Stinkoman_20X6:_Reloaded', 'Stinko Comic', '');
addlilink(tb, '/index.php?title=Template:Main_Page/News_and_Info&action=edit', 'News Template','');
addlilink(tb, '/index.php/Category:To_Be_Deleted', 'To be deleted', '');
}
