Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

Los Angeles Public Library Lookup

Search the Los Angeles Public Library Catalog from Amazon book listings.






Jun 24, 2008
davidwag Script's author

Thanks, Sam - I overwrote my code with yours.

 
Jul 4, 2007
Sam Richards Scriptwright

Added the fixed script at:
http://userscripts.org/scripts/show/10445 (or do a search for Los Angeles) hopefully we can get this script fixed and get rid of my copy.

BTW, I have to say how cool I think this plugin is, so thanks to all the original developers. The number of books that I've gotten from the library increased 100%. Some of them I've even gone on to buy too...

Sam.

 
Jul 4, 2007
Sam Richards Scriptwright

If you replace the line:

var header = document.evaluate("//b[@class='sans']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

With:
var header = document.evaluate("//div[@id='priceBlock']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;

Then it should work.

Sam.

 
May 2, 2007
Rocio User

This script doesn't really work anymore because the library updated their search system & amazon completely updated and modified its style.

I made a bookmarklet that opens in a new tab the library page for that book that you are looking at in Amazon.

Techie babble: I have almost no javascript experience, but I made by tweaking around with this script's code & using the library lookup bookmarklet generator (not as easy as it sounds, because in order to generate you have to know what system your library uses).

I wanted to update this greasemonkey script so that it work, but Amazon's website updated from the time this was written and I don't have enough javascript experience to rewrite it and make it work at this point.

I hope this bookmarklet helps someone

& I am going to try to learn how to script so that I can get this greasemonkey script to work or how to transfer this bookmarklet into a greasemonkey script. (Any help would be well appreciated)

Here is the bookmarklet:

javascript:var%20re=/([\/-]|is[bs]n=)(\d{7,9}[\dX])/i;if(re.test(location.href)==true){var%20isbn=RegExp.$2;void(win=window.open('http://catalog1.lapl.org/cgi-bin/cw_cgi?5005+CONFIGcw.ini+useDatabase_965_I_'+ isbn,'LibraryLookup'))}

[Keep in mind I am an amateur so if you can improve it, DO!]

 
Dec 16, 2005
12Jhonny User

You are worthy of great praise. Going from wanting a book to looking it up has always beens such an ordeal. Now I can just put everything in an amazon cart and check it out. Thanks.

You could comment on this script if you were logged in.