I was writing an addon to modify the layout of google search results ( and many other features).
One feature is to add favicons und numbering to search results.
Number and favicon should be at the beginning of the visible header3 link. But for now they are at height of the hosttext, above the link (also too much at right)
Here is an image to emphasize what I mean.
Here is my relevant code, which adds number and favicon:
Code: Select all
...
var g = link.parentNode; //link = an "a" node in google search results
//create container
if( !link.hasAttribute('goenContainer') )
{
link.setAttribute('goenContainer', "");
var newicon = new Image();
var iconcontainer = link.previousSibling || link;
iconcontainer = doc.createElement('div');
iconcontainer.style.setProperty("minWidth", "16px", "important");
iconcontainer.style.setProperty("visibility", "visible", "important");
var favIcon = iconcontainer.appendChild(goen.createFavIcon());
iconcontainer = g.insertBefore(iconcontainer, link);
//add numbers
if(goenutils.getPref("extensions.googleenhancer.number")){
if(!link.hasAttribute('goenNum')){
link.setAttribute('goenNum', "");
var citeNode = document.createElement("cite");
citeNode = favIcon.parentNode.insertBefore(citeNode, favIcon);
citeNode.textContent = String(s + i) + '. ';
}
count[1] += 1;
}
...