Skip to main content
ExLibris

Knowledge Assistant

BETA
 
Back
Aleph

 

Ex Libris Knowledge Center
  1. Search site
    Go back to previous article
    1. Sign in
      • Sign in
      • Forgot password
  1. Home
  2. Aleph
  3. Knowledge Articles
  4. Google Books Search alternative script

Google Books Search alternative script

  1. Last updated
  2. Save as PDF
  3. Share
    1. Share
    2. Tweet
    3. Share
No headers
Alan Rykhus (ODIN) has rewritten the javascript for ProcessGBSBookInfo to make sure it shows the correct book cover.
The following is the enhanced code:

<script>
// Function to process GBS info and update the dom.
function ProcessGBSBookInfo(booksInfo) {
var url_elem = document.getElementById("$0800");
var pic_elem = document.getElementById("google_book");
var str = "$0800";
var str_parts = str.split(":");
var isbn = str_parts[1];
for (var items_idx = 0; items_idx < booksInfo.totalItems ; items_idx++)
{
var item = booksInfo.items[items_idx];
if(!item.volumeInfo || !item.volumeInfo.industryIdentifiers) {
continue;
}
for (var vinfo_idx = 0; vinfo_idx < item.volumeInfo.industryIdentifiers.length; vinfo_idx++)
{
var vinfo_id = item.volumeInfo.industryIdentifiers[vinfo_idx];
if (((vinfo_id.type == "ISBN_10") || (vinfo_id.type == "ISBN_13")) && (vinfo_id.identifier == isbn)) {
url_elem.href = item.volumeInfo.infoLink;
url_elem.style.display = '';
if (item.volumeInfo.imageLinks.smallThumbnail)
{
pic_elem.src = item.volumeInfo.imageLinks.smallThumbnail;
pic_elem.style.display = '';
break;
}
}
}
}
}
</script>
View article in the Exlibris Knowledge Center
  1. Back to top
    • Google books on brief table view
    • Google Books Search in Aleph OPAC does not return correct Book cover
  • Was this article helpful?

Recommended articles

  1. Article type
    How-To
    Language
    English
    Product
    Aleph
  2. Tags
    This page has no tags.
  1. © Copyright 2025 Ex Libris Knowledge Center
  2. Powered by CXone Expert ®
  • Term of Use
  • Privacy Policy
  • Contact Us
2025 Ex Libris. All rights reserved