Modified for isbn or title search with templating
|
|
Love the script. Here's a modified version with a few changes that allows for URLs that don't just stick the title on the end (my library seems to care about the order of the request variables, which is totally ridiculous), and that allows you to search by ISBN13 if your library lets you (more accurate than a title search). You can still use it for just title searches by putting {{title}} in your base_url, this is just a little more flexible. Here goes: // ==UserScript==
//To use your own library here, just replace the library_name and base_url with ones that match yours.
var library_name = "Minuteman Library"; //Eastern MA
var title = document.getElementById('bookPageTitle').innerHTML;
var search_url = base_url.replace("{{isbn13}}",isbn13).replace("{{title}}",title); var linksDiv = document.getElementById('affiliateLinks'); var full = document.createElement('span');
var txtNode = document.createTextNode(library_name);
full.appendChild(document.createTextNode(' '));
linksDiv.insertBefore(full,linksDiv.childNodes[3]); |
![]() ![]() |
Hi Yoni! Glad you liked the script. Amazingly i've only just come across your post (4 months late!). I would have expected UserScripts to send me email notification or something when someone comments on one of my scripts but nevermind ... To be honest I didn't expect much general interest in this script anyway, I put it together mostly for myself and my family - so cool that you found it! I like your modifications too, I did consider trying to make it as generic/re-usable as possible but only had time to put together a quick-n-dirty version for personal use. Plus my raw Javascript skills aren't brilliant! Cheers
|

