Hack #54. Add More Book Reviews to Google Print

Link to other book review and shopping sites after reading Google's book excerpts.

Google Print is a wonderful service, offering a fully searchable index into books before you buy them. But when you're ready to buy, there are a limited number of choices of online bookstores to which Google provides direct links.

Of course, there's more on the Web than just shopping sites. All Consuming (http://www.allconsuming.net) specializes in aggregating third-party reviews of books that people have recently blogged. This hack adds a link from Google Print to the page on All Consuming that displays reviews of the book you're interested in.

The Code

This user script runs on Google Print pages. It finds the ISBN of the book you're currently viewing and adds links to the pages on All Consuming just below the link to Froogle.

Save the following user script as otherbookreviews.user.js:

	// ==UserScript==
	// @name			Other Book Reviews
	// @namespace		http://diveintomark.org/projects/greasemonkey/
	// @description		add links to AllConsuming.net in Google Print // @include http://print.google.com/print* // ==/UserScript== // based on Butler // http://diveintomark.org/projects/butler/ 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('q=')[1].split('&')[0]; var elmAllConsuming = document.createElement("a"); ...

Get Greasemonkey Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.