Tuesday, February 22, 2011

Searching WorldCat.org

Okay so you've found a reference to a book, author, musical performer, subject, etc. somewhere on the internet. You wonder whether a library near you has a copy, what materials on the subject exist, or what else this author, musician, etc has created. You could search participating libraries at worldcat.org as a part of the sleuthing process by using OCLC/WorldCat's search add-on for your web browser. Oh, wait that only works in Firefox....

For those of you who don't want to make your Firefox search add-on list any longer, or don't even use Firefox, you can drag this link to your bookmarks toolbar, select some text on a web site, click the bookmark and be taken in a new window/tab to WorldCat results. It is a hack, but can be easily refined in a number of ways, if one wished. It works for me the way it is, with one little problem: selected text in a form field (and probably within flash content) can't be used as fodder for the search.

Here is the code:
javascript:(
function%20getSelText(){
var%20txt='';
if(window.getSelection){
txt=window.getSelection();
}
else%20if(document.selection){
txt=document.selection.createRange().text;
}
else{
return;
}
newSearch=window.open(%22http://www.worldcat.org/search?q=%22+txt);
}
)();