www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 10c148135a8cfd1bb8eba22216f7baabcda8a971
parent e161f19272f9d58771e7bb807f44d8f89668c30b
Author: Matt Burton <mcburton@gmail.com>
Date:   Thu, 27 Nov 2008 04:59:26 +0000

Fixes #1225: Pubmed Translator Fails on Search Results Pages
changed the xpath for article to search for <p> instead of <div> 


Diffstat:
Mtranslators/NCBI PubMed.js | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/translators/NCBI PubMed.js b/translators/NCBI PubMed.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2008-08-29 04:10:00" + "lastUpdated":"2008-11-26 11:53:00" } function detectWeb(doc, url) { @@ -175,7 +175,7 @@ function doWeb(doc, url) { if (other) { var article = doc.evaluate('.//h2', tableRow, nsResolver, XPathResult.ANY_TYPE, null).iterateNext(); } 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; } @@ -201,4 +201,4 @@ function doWeb(doc, url) { function doSearch(item) { // pmid was defined earlier in detectSearch lookupPMIDs([getPMID(item.contextObject)]); -} -\ No newline at end of file +}