From f9b4b83f18cdd79595636553ef2b3c48c1e50f3e Mon Sep 17 00:00:00 2001 From: Avram Lyon Date: Fri, 14 Jan 2011 05:43:45 +0000 Subject: [PATCH] Trans: Add support for DOIs as JIDs in JSTOR (per http://forums.zotero.org/discussion/15827/) --- translators/JSTOR.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/translators/JSTOR.js b/translators/JSTOR.js index 7fd6a9983..9dd0db974 100644 --- a/translators/JSTOR.js +++ b/translators/JSTOR.js @@ -76,6 +76,13 @@ function doWeb(doc, url) { var jid = RegExp.$1; Zotero.debug("JID found 1 " + jid); } + // Sometimes JSTOR uses DOIs as JID + else if (/(?:pss|stable)\/(10\.\d+\/.+)/.test(url)) { + Zotero.debug("URL " + url); + jid = RegExp.$1; + allJids.push(jid); + Zotero.debug("JID found 2 " + jid); + } else if (/(?:pss|stable)\/(\d+)/.test(url)) { Zotero.debug("URL " + url); jid = RegExp.$1; @@ -192,4 +199,4 @@ function doWeb(doc, url) { var callbacks = [first, second]; Zotero.Utilities.processAsync(sets, callbacks, function () { Zotero.done(); }); Zotero.wait(); -} \ No newline at end of file +}