Not working anymore
|
|
It looks like Google changed the format of the search results page URLs. I tried to update this script on my computer accordingly, but I can't seem to get it to work. |
|
|
It's working for me, but I think the "Included Pages" is a bit restrictive. For example if I do a search from Google France, the text link is missing. If I set the "Included Pages" to http://www.google.* seems to be OK. |
![]() ![]() |
Very good guess 666f6f!
// @include http://www.google.*/search* I think it's just great this way. |
![]() ![]() |
Updated the code to work with recent changes on Google search result page. Currently for Firefox. September 1, 2010
var allLinks, thisLink;
allLinks = document.evaluate(
"//a[contains(@href,'/search%3Fq%3Dcache')]",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allLinks.snapshotLength; i++)
{
thisLink = allLinks.snapshotItem(i);
var txt = document.createElement("a");
txt.className = thisLink.className;
start = thisLink.href.indexOf("cache:");
start = start + 6;
end = thisLink.href.indexOf("%2B");
var newlink = thisLink.href.substring(start,end);
txt.href = "http://webcache.googleusercontent.com/search?q=cache:" + newlink + "&hl=en&client=firefox-a&gl=my&strip=1";
txt.insertBefore(document.createTextNode("Text"),null);
thisLink.parentNode.insertBefore(txt, thisLink.nextSibling);
thisLink.parentNode.insertBefore(document.createTextNode(" - "),txt);
}
|


