By benoitb
Has no other scripts.
// ==UserScript==
// @name GoogleNavBarDuplicate
// @namespace http://www.orange.com
// @author Benoit BAILLEUX
// @description Duplicate the navbar in Google Image result page
// @include http://images.google.*/images?*
// ==/UserScript==
(function()
{
doc = window.document;
// Find the node tree with the navbar only (and not the Google logo)
var s = doc.getElementById('np');
if (s == null) s = doc.getElementById('nn');
// If no navbar : exit !
if (s == null) return;
var navbarIntern = s.parentNode.parentNode.parentNode.cloneNode(true);
// Create a shell for the nodeTree :
var navbar = doc.createElement("table");
// Make it pretty (!) :
navbar.setAttribute('align', 'center');
navbar.setAttribute('style', 'font-size:small;background:#EEEEEE;border:solid grey thin;margin-bottom:3px;padding-top:0px;');
var tr = doc.createElement("tr");
tr.appendChild(navbarIntern);
navbar.appendChild(tr);
// Add it just over the images list :
var target = doc.getElementById('ImgContent');
if (target != null) {
target.parentNode.insertBefore(navbar, target);
} else {
// Bad luck ...
}
})();