www

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

commit 79ad1d80ad22900ba6d7caf97b8d59cad1f1f593
parent 7307fcdd2234007fa429e7104292837862c60eed
Author: Matt Burton <mcburton@gmail.com>
Date:   Sat, 10 Jan 2009 18:15:04 +0000

Fixes #1282 doc.location.href was null in the doGet callback, using the previously set variable snapshot. Also changed cleanString() to trimInternal()

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

diff --git a/translators/ACM.js b/translators/ACM.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2008-06-06 08:45:00" + "lastUpdated":"2009-01-10 01:15:00" } function detectWeb(doc, url) { @@ -52,10 +52,9 @@ function scrape(doc) { if (!abstract.textContent.match(/\w+/)) { var abstract = doc.evaluate('//div[@class="abstract"]/p[2]', doc, null, XPathResult.ANY_TYPE, null).iterateNext(); } - if(abstract) abstract = Zotero.Utilities.cleanString(abstract.textContent); + if(abstract) abstract = Zotero.Utilities.trimInternal(abstract.textContent); } var snapshot = doc.location.href; - var attachments = new Array(); var url; var typeLinks = doc.evaluate('//td[@class="smaller-text"]/a[img]', doc, null, @@ -109,7 +108,7 @@ function scrape(doc) { item.attachments = attachments; item.tags = keywords; item.DOI = doi; - item.url = doc.location.href; + item.url = snapshot; item.complete(); }); translator.translate();