Skip to content
Permalink
Browse files

Don't try to look up PMIDs via Crossref

PMIDs are converted to OpenURL context objects, which Crossref can
handle in some cases, but as far as I can tell PMIDs aren't supported
and should just be retrieved from PubMed.
  • Loading branch information...
dstillman committed Jan 7, 2019
1 parent 583ea81 commit 21aca1d4b40c027c4f5124bbe38e599455f7e0cb
Showing with 5 additions and 1 deletion.
  1. +5 −1 CrossRef.js
@@ -9,7 +9,7 @@
"priority": 90,
"inRepository": true,
"browserSupport": "gcsv",
"lastUpdated": "2018-10-07 06:23:28"
"lastUpdated": "2019-01-07 08:14:17"
}

/* CrossRef uses unixref; documentation at http://www.crossref.org/schema/documentation/unixref1.0/unixref.html */
@@ -63,6 +63,10 @@ function removeUnsupportedMarkup(text) {
function detectSearch(item) {
// query: should we make this more forgiving?
if (item.itemType === "journalArticle" || item.DOI) {
// Don't try to look up PMIDs
if (item.contextObject && item.contextObject.startsWith('rft_id=info:pmid')) {
return false;
}
return true;
}
return false;

0 comments on commit 21aca1d

Please sign in to comment.
You can’t perform that action at this time.