From 0a3c6c25ea5026153790400f5c84bad365bc9303 Mon Sep 17 00:00:00 2001 From: Avram Lyon Date: Tue, 16 Nov 2010 21:13:36 +0000 Subject: [PATCH] Trans: Add support for name suffixes to PubMed translator. Requires Zotero 2.1 for best usage, since the suffixes will be misinterpreted by the old csl.js citation processor. --- translators/NCBI PubMed.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/translators/NCBI PubMed.js b/translators/NCBI PubMed.js index 939b8daaa0..f5488f6619 100644 --- a/translators/NCBI PubMed.js +++ b/translators/NCBI PubMed.js @@ -4,11 +4,11 @@ "label":"NCBI PubMed", "creator":"Simon Kornblith, Michael Berkowitz, Avram Lyon, and Rintze Zelle", "target":"https?://[^/]*(www|preview)\\.ncbi\\.nlm\\.nih\\.gov[^/]*/(pubmed|sites/pubmed|sites/entrez|entrez/query\\.fcgi\\?.*db=PubMed)", - "minVersion":"1.0.0b3.r1", + "minVersion":"2.1b1", "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2010-11-10 10:15:00" + "lastUpdated":"2010-11-17 10:15:00" } function detectWeb(doc, url) { @@ -142,7 +142,11 @@ function lookupPMIDs(ids, doc) { var lastName = authors[j].LastName.text().toString(); var firstName = authors[j].FirstName.text().toString(); if(firstName == "") { - var firstName = authors[j].ForeName.text().toString(); + firstName = authors[j].ForeName.text().toString(); + } + var suffix = authors[j].Suffix.text().toString(); + if(suffix && firstName != "") { + firstName += ", " + authors[j].Suffix.text().toString(); } if(firstName || lastName) { newItem.creators.push({lastName:lastName, firstName:firstName});