O'Reilly Text ISBN to Amazon.co.uk Linker -- Greasemonkey

I got bored of having two windows open and having to copy the ISBN from the O’Reilly site, tab to the amazon.co.uk window, paste in to the search box and press return. And when I was looking at more than a single book it got worse… So in a fit of laziness that cost me two hours I wrote my first Greasemonkey user script; which I called O’Reilly ISBN Link2Amazon.co.uk. The script is pretty simple, it replaces the plain text ISBN on the O’Reilly catalog pages with a link to the book at Amazon.co.uk

My JavaScript is terrible and so it took way too long for me to put together and it’s got a very hacky ISBN extractor. It’d be better with a two phase approach, the first one with something like ([\w|\d|-]*) and then the second one to remove the hyphens. But I couldn’t get that to work. I’ll go back and tidy the regex up when I work out enough of the language to make it do The Right Thing. Oh for a perl interpreter…