From 79ad1d80ad22900ba6d7caf97b8d59cad1f1f593 Mon Sep 17 00:00:00 2001 From: Matt Burton Date: Sat, 10 Jan 2009 18:15:04 +0000 Subject: [PATCH] Fixes #1282 doc.location.href was null in the doGet callback, using the previously set variable snapshot. Also changed cleanString() to trimInternal() --- translators/ACM.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/translators/ACM.js b/translators/ACM.js index df9cfd3fb2..157ee6c97c 100644 --- 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();