
// ==UserScript==
// @name Add Map link to Google
// @namespace http://www.csh.rit.edu/~topher/gm
// @description Add Map link to Google
// @include http://www.google.com/*



// should work in both Turnabout and Grease Monkey

// version 1.0	- initial release

(function() {



/* Add Maps link */

var links = document.getElementsByTagName("a"); 



for(i=0; i < links.length; i++) {
	var href = new String( links[i].getAttribute("href") );

	if ( href.indexOf("/intl/en/options/") != -1 ) {
		
		
		var newCont = document.createElement("span");
		var newLink = document.createElement("a");
		newLink.setAttribute("href","http://maps.google.com");



		newLink.appendChild(document.createTextNode('Maps'));

		newCont.appendChild(newLink);
		newCont.appendChild(document.createTextNode('    '));

		links[i].parentNode.parentNode.insertBefore(newCont,links[i].parentNode);
		
	
		break;
	
	}

}



}) ();
