Trans: Pubmed fix for one more PMID location, per http://forums.zotero.org/discussion/17662

This commit is contained in:
Avram Lyon 2011-04-22 00:10:40 +00:00
parent 4a170fce6f
commit 17f6259125

View file

@ -9,7 +9,7 @@
"priority":100,
"configOptions":{"dataMode":"block"},
"inRepository":true,
"lastUpdated":"2011-03-10 10:15:00"
"lastUpdated":"2011-04-21 10:15:00"
}
function detectWeb(doc, url) {
@ -264,6 +264,14 @@ function doWeb(doc, url) {
nsResolver, XPathResult.ANY_TYPE, null);
uid = uids.iterateNext();
}
if (!uid) {
// Fall back on <dl class="rprtid">
// See http://www.ncbi.nlm.nih.gov/pubmed?term=1173[page]+AND+1995[pdat]+AND+Morton[author]&cmd=detailssearch
// Discussed http://forums.zotero.org/discussion/17662
uids = doc.evaluate('//dl[@class="rprtid"]/dd[1]', doc,
nsResolver, XPathResult.ANY_TYPE, null);
uid = uids.iterateNext();
}
if (uid) {
ids.push(uid.textContent.match(/\d+/)[0]);
Zotero.debug("Found PMID: " + ids[ids.length - 1]);