Skip to content

Instantly share code, notes, and snippets.

@rdmpage
Created May 30, 2013 15:47
Show Gist options
  • Save rdmpage/5678917 to your computer and use it in GitHub Desktop.
Save rdmpage/5678917 to your computer and use it in GitHub Desktop.
Bookmarklet to find registration agency of a DOI using CrossRef service, see http://www.crossref.org/crweblog/2013/05/find_the_registration_agency_f.html. Create a bookmark on your browser bookmark bar and paste Javascript below as bookmark address. Then highlight DOI on web page, click book mark and see the registration agency.
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=r[2]:a=true;a?alert('Please%20highlight%20a%20full%20DOI,%20or%20deselect%20text%20to%20add%20this%20page.'):w=open('http://doi.crossref.org/doiRA/'+u,'DOI%20Registration%20Agency','width=720,height=755,scrollbars,resizable');void(x.setTimeout('w.focus()',200));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment