[Greasemonkey] updated otherbooksreviews.user.js
Stéphane Payrard
stef at stefp.dyndns.org
Sat Feb 4 02:10:10 EST 2006
It was broken by some changes in the google page.
Namely the URL so that the script was not run, and
the format of the froogle link.
Thanks Mark for a good book.
O'Reilly should have edited out reams of data in the
script lisint that bring nothing to the comprehension
Enjoy.
// ==UserScript==
// @name Other Book Reviews
// @namespace http://diveintomark.org/projects/greasemonkey/
// @description add links to AllConsuming.net in Google Print
// @include http://books.google.com/books*
// ==/UserScript==
// based on Butler
// http://diveintomark.org/projects/butler/
GM_log("start");
var elmFroogle = document.evaluate( "//a[contains(@href, 'froogle')]",
document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,
null).singleNodeValue;
if (!elmFroogle) return;
var sISBN = unescape(elmFroogle.href).split('ISBN:')[1].split('&')[0];
GM_log(sISBN);
var elmAllConsuming = document.createElement("a");
elmAllConsuming.href = 'http://allconsuming.net/item/asin/' + sISBN;
elmAllConsuming.style.display = "block";
elmAllConsuming.innerHTML = "<br>Reviews @<br>AllConsuming.net";
elmFroogle.parentNode.insertBefore(elmAllConsuming,
elmFroogle.nextSibling);
More information about the Greasemonkey
mailing list