Replace library form

Using: 
Greasemonkey, user script compiler
Year: 
2009

Because it is unclear what the privacy policies of worldcat.org are, especially with regards to data retention and level of compliance under the Patriot act, it is all the more heinous that the Cornell Libraries has instituted a new form that defaults to sending all searches through worldcat.org. These searches thus leave the confines of the Cornell campus network and are sent in plaintext over the web, open to interception by anyone.

All the more, the worldcat.org results are less useful (requiring clicks on each item to see its location and status, rather than on the search results themselves under the “classic” catalog), use unnecessary AJAX to load the book’s status, are nearly 7 times as large as the “classic” results, and link the library to commercial entities (not local ones) for the “ability” to purchase books. All these aspects are at cross purposes to the mission of the library and the search form on the library website, namely whether or not the book is located at the library and if so, where it is.

Thus this script, also available in a standalone version, that replaces the “new” worldcat.org interface with the older “classic” interface, thus negating the need to click multiple times in order to protect your privacy.

Greasemonkey Userscript

// ==UserScript==
//  @name   Replace Library Form
//  @namespace      http://zeitkunst.org
//  @description    Replace the worldcat form with the "classic" one
//  @include        http://www.library.cornell.edu/
//  @include        http://*.library.cornell.edu
//  @version        0.1.4
// ==/UserScript==
 
window.addEventListener(‘load’,
    function() {
        divToReplace = document.getElementById("quick-search");
        divToReplace.innerHTML = "<form name=\"querybox\" action=\"http://www.library.cornell.edu/script/opac-redirect.php\" method=\"get\"><h2>for</h2> &nbsp;&nbsp; <span class=searchForm> <input size=\"25\" name=\"Search_Arg\" id=searchInput> <select name=\"Search_Code\" size=\"1\"> <option selected value=\"TALL\">Title</option> <option value=\"JALL\">Journal Title</option> <option value=\"ISSN\">Journal Title Abbreviation</option> <option value=\"NAME_\">Author</option> <option value=\"SUBJ_\">Subject Heading</option> <option value=\"CALL_\">Call Number</option> <option value=\"AUTH\">Author—Sorted by Title</option> <option value=\"FT*\">Relevance Keyword</option> <option value=\"CMD\">Command Keyword</option> </select><input type=\"hidden\" value=\"1\" name=\"HIST\"/><input type=\"hidden\" value=\"10\" name=\"CNT\" /><input style=\"margin-left: 5px\" type=\"submit\" value=\"Search\"/></span></form><div id=\"classic-catalog-tab\" class=\"advanced-search\"> <a href=\"http://catalog.library.cornell.edu\">Classic Catalog</a></div><div class=\"advanced-search\"><a href=\"javascript:void(0);\" id=\"toggleExplanation\">Explain what’s going on</a></div><div class=\"advanced-search\" style=\"font-size: smaller\"><div id=\"replaceLibraryFormExplanation\" style=\"display: none\">Don’t use the new library catalog!<br/>There are privacy concerns when using worldcat.org,<br/>the new search results page is less useful, and<br/>purchasing books through affiliate links of <br/>multi-national corporations goes against the library’s core mission.<br/>  Only use the classic catalog!</div></div>";
 
        // See this page for accessing the jquery "$" element:
        // http://jimbojw.com/wiki/index.php?title=Using_Prototype_and_Scriptaculou... 
 
        $ = unsafeWindow[‘window’].$;
 
        // we use the jquery toggle function to display or hide the explanation
        $(‘#toggleExplanation’).click(function() {$(‘#replaceLibraryFormExplanation’).toggle();});
    }
 
, true);
Images: 
Replace library form

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • You can use Textile markup to format text.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Image links from G2 are formatted for use with Lightbox2
  • Image links with 'rel="lightshow"' in the <a> tag will appear in a Lightbox slideshow when clicked on.

More information about formatting options

Syndicate content
walrus