Fixes #1225: Pubmed Translator Fails on Search Results Pages
changed the xpath for article to search for <p> instead of <div>
This commit is contained in:
parent
e161f19272
commit
10c148135a
1 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@
|
||||||
"maxVersion":"",
|
"maxVersion":"",
|
||||||
"priority":100,
|
"priority":100,
|
||||||
"inRepository":true,
|
"inRepository":true,
|
||||||
"lastUpdated":"2008-08-29 04:10:00"
|
"lastUpdated":"2008-11-26 11:53:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
function detectWeb(doc, url) {
|
function detectWeb(doc, url) {
|
||||||
|
@ -175,7 +175,7 @@ function doWeb(doc, url) {
|
||||||
if (other) {
|
if (other) {
|
||||||
var article = doc.evaluate('.//h2', tableRow, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();
|
var article = doc.evaluate('.//h2', tableRow, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();
|
||||||
} else {
|
} else {
|
||||||
var article = doc.evaluate('.//div[@class="title"]', tableRow, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();
|
var article = doc.evaluate('.//p[@class="title"]', tableRow, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();
|
||||||
}
|
}
|
||||||
items[uid.value] = article.textContent;
|
items[uid.value] = article.textContent;
|
||||||
}
|
}
|
||||||
|
@ -201,4 +201,4 @@ function doWeb(doc, url) {
|
||||||
function doSearch(item) {
|
function doSearch(item) {
|
||||||
// pmid was defined earlier in detectSearch
|
// pmid was defined earlier in detectSearch
|
||||||
lookupPMIDs([getPMID(item.contextObject)]);
|
lookupPMIDs([getPMID(item.contextObject)]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue