Something like the code in Tim Spalding's Thingology Blog.

<div id="gbsthumbnail"></div>
<div id="gbslink"></div>

<script type="text/javascript">

/* GBS Cover Script by Tim Spalding/LibraryThing */

function addTheCover(booksInfo)
{
var gbsnameA = new Array("No information", "Book info", "Partial view", "Full view");

for (i in booksInfo)
 {
 var book = booksInfo[i];
 
 var quality = 0;
 if(book.preview == "noview") { quality = 1; }
 if(book.preview == "partial") { quality = 2; }
 if(book.preview == "full")  { quality = 3; }
 
 if (book.thumbnail_url != undefined)
  {
  document.getElementById('gbsthumbnail').innerHTML =
   '<img src="' + book.thumbnail_url + '">';
  }
 if (quality > 3)
  {
  document.getElementById('gbslink').innerHTML =
   "<a href=\'" + book.preview_url + "\'>" + "Google Books: " + gbsnameA[quality] + "</a>";
  }
 }
}

</script>

<script src="http://books.google.com/books?jscmd=viewapi&bibkeys=ISBN:0670880728&callback=addTheCover"></script>
CommentFileSizeAuthor
#1 millennium_google_books.jpg43.21 KBjanusman

Comments

janusman’s picture

Assigned: Unassigned » janusman
StatusFileSize
new43.21 KB

Added to DEV version. Try it out!

So far there is only one config. option: dont show / show in full view / show in teaser + full view.

It only shows the link if the item has either limited or full view at Google. It does this by calling a javascript at Google for each item being shown on screen; so this incurs a possible performance penalty on the browser.

janusman’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.