Adding Firefox button on bookmarks toolbar for @lab bookmark site

  • Right click on the bookmark toolbar and select 'New Bookmark' option.

  • In the name field type in 'Add to @lab bookmarks'
  • Place the following javascript in the location field and click on OK button:
    javascript:u=location.href;a=false;x=window;e=x.encodeURIComponent;d=document;if((s=d.selection)?t=s.createRange().text:t=x.getSelection()+'')(r=/(doi:)?\s?(10\.\d{4}\/\S+)/.exec(t))?u='http://dx.doi.org/'+r[2]:a=true;a?alert('Please highlight a full DOI, or deselect text to add this page.'):w=open('http%3A//bob.lab.ac.uab.edu/bibliotech/add?continue=return&uri='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'add','width=720,height=755,scrollbars,resizable');void(x.setTimeout('w.focus()',200)); 
    

  • This will create a new tab on the bookmark toolbar. If you click on it while logged in the @lab bookmarks site, it will pop-up a new window where you can add the webpage to @lab bookmarks. If you are not logged in the @lab bookmarks site, it will show you the home page of @lab bookmarks site.