Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 2 files changed
  • 0 comments
  • 1 contributor
1  .gitignore
... ...
@@ -0,0 +1 @@
  1
+.DS_Store
12  doi-bookmarklet.js
... ...
@@ -0,0 +1,12 @@
  1
+(function() {
  2
+    var proxyUrl = "http://proxy.lib.umich.edu";
  3
+    var selection = document.getSelection ? document.getSelection().toString() : document.selection.createRange().text;
  4
+    var regex = /\w?(?:doi:|hdl:(?:\/\/)?)\s*([0-9./a-z]+)\w?/i;
  5
+    var match = regex.exec(selection);
  6
+    if (match != null) {
  7
+	   var doi = match[1];
  8
+	   var tempAnchor = document.createElement('a');
  9
+	   tempAnchor.href = proxyUrl;
  10
+	   document.location = tempAnchor.protocol + '//dx.doi.org.' + tempAnchor.host + '/' + doi;
  11
+    }
  12
+ })();

No commit comments for this range

Something went wrong with that request. Please try again.