w3schools beautifyer

By smk Last update Nov 5, 2009 — Installed 262 times. Daily Installs: 0, 0, 0, 0, 1, 0, 0, 2, 0, 2, 6, 7, 2, 3, 3, 5, 3, 1, 0, 0, 1, 0, 0, 2, 0, 2, 0, 0, 0, 0, 1, 1

There are 9 previous versions of this script.

// ==UserScript==
// @name           w3schoolsBeautifyer
// @namespace      smk
// @description    kills random stuff, widens, etc.
// @include        http://www.w3schools.com/*
// @include        http://w3schools.com/*
// ==/UserScript==
var table=document.evaluate('//td[@align="center"]/div',document,null,9,null).singleNodeValue.nextSibling;
if(table){
	while(table.nodeName!='TABLE') table=table.parentNode;
	table.width=(document.body.offsetWidth-250)+"px";
	table.innerHTML=table.innerHTML.replace(/SPOTLIGHTS(.|\n)*(<\/tr>)/,"ads removed!-->$2");
	var topAd=document.evaluate('//a[@name="top"]',document,null,9,null).singleNodeValue.parentNode.childNodes[6];
	if(topAd) topAd.parentNode.removeChild(topAd);
	var rightCol=document.evaluate('./td[@class="right_container"]',table.parentNode.parentNode,null,9,null).singleNodeValue;
	if(!rightCol){
		try{
			rightCol=document.evaluate('//td[contains(@style,"/pagetop_topright.")]',document,null,9,null).singleNodeValue.nextSibling.nextSibling;
		}catch(e){rightCol=null;}
	}
	if(rightCol){
		while(rightCol=rightCol.nextSibling) rightCol.parentNode.removeChild(rightCol.previousSibling);
	}else{
		mainCol=document.evaluate('.//table[@width=569]',table,null,9,null).singleNodeValue;
		mainCol.removeAttribute('width');
	}
	
}else GM_log('Table not found, please report this error to the userscripts discussion of this script');