Skip to content

Instantly share code, notes, and snippets.

@judell
Created May 22, 2017 20:02
Show Gist options
  • Save judell/63757412ab8237fd2e6ab94aefdf1402 to your computer and use it in GitHub Desktop.
Save judell/63757412ab8237fd2e6ab94aefdf1402 to your computer and use it in GitHub Desktop.
doi search
diff --git a/src/sidebar/frame-sync.js b/src/sidebar/frame-sync.js
index 8a80563..b4dec82 100644
--- a/src/sidebar/frame-sync.js
+++ b/src/sidebar/frame-sync.js
+ // if doi available as highwire or dc meta, include in search
+
+ if ( info.metadata && info.metadata.highwire && info.metadata.highwire.doi )
+ searchUris = searchUris.concat('doi:' + info.metadata.highwire.doi[0]);
+
+ if ( info.metadata && info.metadata.dc && info.metadata.dc.doi)
+ searchUris = searchUris.concat('doi:' + info.metadata.dc.doi[0]);
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment