User:MadQ/monobook.js

/*var attache = {};

if(document.parentWindow.addEventListener) { attache.eventName = "load"; attache.tehMethod = document.parentWindow.addEventListener; } else { attache.eventName = "onload"; attache.tehMethod = document.parentWindow.attachEvent; } //document.parentWindow.attachEvent("onload", function attache.tehMethod(attache.eventName

$(window).load( function {

setTimeout( function	{		var links	= document.links;		var i;		var antiAnchor;		var a;

for(i = links.length - 1; i > -1; i--) { a = links[i]; h = a.href.match(/#(.*)$/); if( h == null || h[1] == null || h[1].length < 1 ) continue; h		= h[1]; antiAnchor 	= document.getElementById(h); if(antiAnchor == null) continue; antiAnchor.insertAdjacentHTML("beforeBegin", ""); }	}, 1000);	function tryIt(f)	{		try {			f;		}		catch(ex) {		}	}	function trySetStyle(e,n,v)	{		tryIt( function{ e.style[n] = v; } );		tryIt( function{ e.currentStyle[n] = v; } );		tryIt( function{ e.runtimeStyle[n] = v; } );		tryIt( function{ e.style.setAttribute(n,v); } );		tryIt( function{ e.currentStyle.setAttribute(n,v); } );		tryIt( function{ e.runtimeStyle.setAttribute(n,v); } );	}	setTimeout( function {

var pres = document.getElementsByTagName("PRE"); var q = 0;

for(i = pres.length - 1; i > -1; i--) { trySetStyle(pres[i], "fontFamily", "Consolas"); /* pres[i].style.fontFamily = "Consolas"; */ if( !/#f9f9f9/i.test(pres[i].currentStyle.backgrounColor) ) continue; trySetStyle(pres[i], "backgroundColor", "buttonface");

/* pres[i].style.backgroundColor = "buttonface"; */ }

}, 2300);

});