Jump to content

User:ESkog/Oldmonobook.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ESkog (talk | contribs) at 16:29, 10 July 2006 (rv - keeping it here for now). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
//<nowiki> Admin tools
document.write('<script type="text/javascript" src="' 
             + 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/admin/monobook.js' 
             + '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//</nowiki>[[Category:VoA scripted admins|{{PAGENAME}}]]

/*** Other hooks ***/

addOnloadHook(morelinks);

/*** Make old AfD's appear or disappear - from AmiDaniel's monobook ***/

function hideafd()
{
	var divs = document.getElementsByTagName("div");
	for(var x = 0; x < divs.length; ++x)
		if(divs[x].className.indexOf("vfd") != -1)
		divs[x].style.display = "none";
	document.getElementById('footer').style.display = 'none';
}
	
function showafd()
{
	var divs = document.getElementsByTagName("div");
	for(var x = 0; x < divs.length; ++x)
		if(divs[x].className.indexOf("vfd") != -1)
		divs[x].style.display = "";
	document.getElementById('footer').style.display = '';
}

function morelinks() {
	var tabs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
	if(document.title.indexOf("Wikipedia:Articles for deletion") == 0) {
		addlilink(tabs, 'javascript:hideafd()', 'hide closed', 'ca-hide');
		ta['ca-hide'] = ['', 'Hide closed AFDs'];
		addlilink(tabs, 'javascript:showafd()', 'show closed', 'ca-show');
		ta['ca-show'] = ['', 'Show closed AFDs'];
	} 
}