Trans: Pubmed fix for one more PMID location, per http://forums.zotero.org/discussion/17662
This commit is contained in:
parent
4a170fce6f
commit
17f6259125
|
@ -9,7 +9,7 @@
|
||||||
"priority":100,
|
"priority":100,
|
||||||
"configOptions":{"dataMode":"block"},
|
"configOptions":{"dataMode":"block"},
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2011-03-10 10:15:00"
|
"lastUpdated":"2011-04-21 10:15:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectWeb(doc, url) {
|
function detectWeb(doc, url) {
|
||||||
|
@ -264,6 +264,14 @@ function doWeb(doc, url) {
|
||||||
nsResolver, XPathResult.ANY_TYPE, null);
|
nsResolver, XPathResult.ANY_TYPE, null);
|
||||||
uid = uids.iterateNext();
|
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) {
|
if (uid) {
|
||||||
ids.push(uid.textContent.match(/\d+/)[0]);
|
ids.push(uid.textContent.match(/\d+/)[0]);
|
||||||
Zotero.debug("Found PMID: " + ids[ids.length - 1]);
|
Zotero.debug("Found PMID: " + ids[ids.length - 1]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user