quote:
Originally posted by rav0
Still wish it worked like CustomizeGoogle though
use this in your userjs thing then.
code:
var links = document.getElementsByTagName('a');
for(var i =0;i<links.length;i++){
var match = links[i].href.match( /\/imgres\?imgurl\=(.*?)\&imgrefurl\=(.*?)\&/ );
if(match){
var div = document.createElement('div');
var imageUrl = document.createElement('a');
var imagePage = document.createElement('a');
var spacer = document.createTextNode(' | ');
div.setAttribute('class','gi_imagetext');
div.setAttribute('style','font-size:10px;');
imageUrl.setAttribute('href',decodeURI(match[1]));
imagePage.setAttribute('href',decodeURI(match[2]));
imageUrl.innerHTML = 'Origin Image';
imagePage.innerHTML = 'Origin Page';
div.innerHTML = '[ ';
div.appendChild(imageUrl);
div.appendChild(spacer);
div.appendChild(imagePage);
div.innerHTML += ' ]';
links[i].parentNode.appendChild(div)
}
}
works just like the screenshot of it earlier in this thread.