// ==UserScript==
// @name        Metro Mojo Hotties
// @namespace   http://dse.webonastick.com/
// @author      Darren Stuart Embry http://dse.webonastick.com/
// @description Makes "locals" links say "hotties" once again.
// @include     http://www.*mojo.com/*
// ==/UserScript==
//
// They will always be hotties to me.
//
// This is a Greasemonkey user script.
// To install it, you need Greasemonkey: http://greasemonkey.mozdev.org/
// Then restart Firefox, and revisit this script.
//
// If you're still using Internet Explorer, then tough cookies.

(function() {
	var anchors = document.getElementsByTagName("a");
	if (!anchors || !anchors.length) return;
	for (var i = 0; i < anchors.length; ++i) {
		var anchor = anchors[i];
		var href = anchor.href;
		if (!href) continue;
		if (!(/\/hotties\//i.test(href))) continue;
		if (!anchor.hasChildNodes()) continue;
		var child = anchor.childNodes[0];
		if (child.nodeType != 3) continue; /* 3 == Node.TEXT_NODE */
		var text = child.data;
		text = text.replace(/\blocals\b/g, "hotties");
		text = text.replace(/\bLocals\b/g, "Hotties");
		child.data = text;
	}
})();

