23 Feb 2013

Linking DOIs on Scopus Preview

I use Scopus RSS feeds via my institutional Scopus access. Unfortunately, if I save links from a feed on the go I get redirected to a ‘Scopus Preview’ page when I later open the link in my browser. This preview offers no direct way to get the full paper, and no outbound links. Seizing the opportunity to experiment with making a jQuery-based user script, I threw together some simple code to add a DOI resolver link to the preview page:

var target_element = $("strong:contains('DOI:')");
var doi_text = target_element.parent().text().replace("DOI: ", "");
var link_text = '<strong><a href="http://dx.doi.org/'
                + doi_text + '"> DOI: ' + doi_text + '</a></strong>';
target_element.parent().html(link_text);

This turns:

Unlinked DOI

into:

Linked DOI

The full script (GitHub Gist) includes code to load jQuery in an intelligent and cross-browser compatible way, so this works in both Firefox (Greasemonkey or Scriptish) and Chrome (Tampermonkey).