Los Angeles Public Library Lookup

By davidwag Last update Jun 24, 2008 — Installed 883 times. Daily Installs: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0

Archived Comments (locked)

Subscribe to Archived Comments 6 posts, 5 voices

Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
davidwag Script's Author

Thanks, Sam - I overwrote my code with yours.

 
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.

 
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.

 
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!]

 
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.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel