// ==UserScript==
// @name Millereadable
// @namespace	http://adamv.com/greases/15/
// @description Unwrap Jeremy D. Miller's blog header.
// @include	http://codebetter.com/blogs/jeremy.miller/*
// ==/UserScript==

function $(o){
	if (typeof(o) == "string") return document.getElementById(o)
	else return o;
}

function foreach(stuff, f){
	for(var i=0; i < stuff.length; i++)
		if (f(stuff[i])) return;
}

function xpath(selector, rootElement, f_each, firstOnly){
	var results = document.evaluate(
		selector, rootElement || document, null,
		XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);

	var nodes = null;
	// If we're only getting the first result, do that
	if (firstOnly){ 
		nodes =  results.iterateNext(); 
	} else {
		nodes = new Array();var result = null;
		while(result = results.iterateNext()) nodes.push(result);	
	}
		
	// If we have a callback function, run it on the results
	if (f_each != null && nodes != null)
		foreach(nodes, f_each);
	else
		return nodes;
}

xpath("//td[@nowrap]", null, function(td){
	td.removeAttribute("nowrap");
});

var tagline = $("tagline");
if (tagline) tagline.parentNode.removeChild(tagline);
