There are 2 previous versions of this script.
// ==UserScript==
// @name GoogleFaces
// @namespace http://userscripts.org/users/23652
// @description Adds a link to switch to Google's Face Search
// @include http://images.google.com/images?*
// @copyright JoeSimmons
// ==/UserScript==
// Inspired by Remy_Porter's script, but doesn't contain any of his code
var out, theLink, i;
out = location.href.replace(/&imgtype=face/g, '').replace(/&imgtype=all/g, '');
theLink = document.createElement("a");
theLink.appendChild(document.createElement("br"));
if(location.href.indexOf("&imgtype=face") == -1)
{
theLink.appendChild(document.createTextNode("Faces Only"));
theLink.href = out + '&imgtype=face';
}
else
{
theLink.appendChild(document.createTextNode("All images"));
theLink.href = out + '&imgtype=all';
}
theLink.className = 'bluelink';
document.evaluate("//a[starts-with(@href, '/preferences?q=')]",document,null,9,null).singleNodeValue.parentNode.parentNode.appendChild(theLink);
GM_addStyle('a.bluelink {color: blue; font-size:10px}');