Library: Difference between revisions

adds definition for ISBN
move bookmarklet to the top of the page; fix typos; link term bookmarklet
Line 1: Line 1:
== The bookmarklet ==
Want this [[wp:bookmarklet|bookmarklet]]?  Drag the following link to your browser bookmark bar: <html><a href="javascript: (function(){var t=window.getSelection?window.getSelection().toString():document.selection.createRange().text;var re = /[\s\-xX0-9]{10,17}/;var OK = re.exec(t);if (!OK) {alert(t + ' is not a valid ISBN\n Please just select a 10 or 13 digit ISBN\ndashes and spaces are OK');} else {t = t.replace(/[\-\s]/,'');window.location='http://newburyport.mvlc.org/eg/opac/results?contains=contains;_special=1;qtype=identifier%7Cisbn;locg=1;pane=numeric;query='+t}})();">Search MVLC</a></html>
== Description ==
Suppose you're shopping on Amazon for a book like Lawrence Lessig's '''[http://www.amazon.com/Free-Culture-Technology-Control-Creativity/dp/1594200068 Free Culture: How Big Media Uses Technology and the Law to Lock Down Culture and Control Creativity]''', and you wonder if your local library has a copy of the book.  Amazon displays the <abbr title='ISBN is an International Standard Book Number. ISBNs are 10-digit or 13-digit codes used by the publishing industry to uniquely identify individual book titles and editions. Some 10-digit ISBNs may end with an "X" instead of a digit.'>ISBN</abbr> near the title or product details.  The catalog for the [http://www.mvlc.org/Libraries Merrimack Valley Library Consortium] supports lookup by ISBN.  If you perform the search, you'll notice that the resulting URL for that search is
Suppose you're shopping on Amazon for a book like Lawrence Lessig's '''[http://www.amazon.com/Free-Culture-Technology-Control-Creativity/dp/1594200068 Free Culture: How Big Media Uses Technology and the Law to Lock Down Culture and Control Creativity]''', and you wonder if your local library has a copy of the book.  Amazon displays the <abbr title='ISBN is an International Standard Book Number. ISBNs are 10-digit or 13-digit codes used by the publishing industry to uniquely identify individual book titles and editions. Some 10-digit ISBNs may end with an "X" instead of a digit.'>ISBN</abbr> near the title or product details.  The catalog for the [http://www.mvlc.org/Libraries Merrimack Valley Library Consortium] supports lookup by ISBN.  If you perform the search, you'll notice that the resulting URL for that search is
<pre>
<pre>
Line 19: Line 23:
       // clean up by removing dashes and spaces
       // clean up by removing dashes and spaces
       t = t.replace(/[\-\s]/,'');
       t = t.replace(/[\-\s]/,'');
       // hand off to MLVC search
       // hand off to MVLC search
       window.location = 'http://newburyport.mvlc.org/eg/opac/results?contains=contains;_special=1;qtype=identifier%7Cisbn;locg=1;pane=numeric;query=' + t;
       window.location = 'http://newburyport.mvlc.org/eg/opac/results?contains=contains;_special=1;qtype=identifier%7Cisbn;locg=1;pane=numeric;query=' + t;
     }
     }
Line 26: Line 30:


{{Messagebox|type=success|text=Note: for the bookmarklet to work, it all has to be on one line.  The code above is presented on several lines for readability.}}
{{Messagebox|type=success|text=Note: for the bookmarklet to work, it all has to be on one line.  The code above is presented on several lines for readability.}}
Want this bookmarklet?  Drag this link to your browser bookmark bar: <html><a href="javascript: (function(){var t=window.getSelection?window.getSelection().toString():document.selection.createRange().text;var re = /[\s\-xX0-9]{10,17}/;var OK = re.exec(t);if (!OK) {alert(t + ' is not a valid ISBN\n Please just select a 10 or 13 digit ISBN\ndashes and spaces are OK');} else {t = t.replace(/[\-\s]/,'');window.location='http://newburyport.mvlc.org/eg/opac/results?contains=contains;_special=1;qtype=identifier%7Cisbn;locg=1;pane=numeric;query='+t}})();">Search MLVC</a></html>


== Try it ==
== Try it ==
Line 35: Line 37:
* Free Culture is ISBN 1594200068
* Free Culture is ISBN 1594200068


If you want to customize the location of the search, you must change the '''locg''' parameter.  <code>locg=1</code> searches across all the MLVC rather than a specific library to cast the widest net - and of course you can always ask for the material to be loaned to your local library.  The Merrimack Valley Library Consortium includes the towns of
If you want to customize the location of the search, you must change the '''locg''' parameter.  <code>locg=1</code> searches across all the MVLC rather than a specific library to cast the widest net - and of course you can always ask for the material to be loaned to your local library.  The Merrimack Valley Library Consortium includes the towns of


# Amesbury
# Amesbury