www

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

commit d08bc12b69b617d8bf72a40c4bb531a1fb594b6c
parent 81a95fe8d0383ff9626a883c3268932e9c80ffa2
Author: Matt Burton <mcburton@gmail.com>
Date:   Thu, 31 Dec 2009 20:54:34 +0000

added willsmith's 09dec09 changes and hardcoded publicationTitle.

Diffstat:
Mtranslators/wsj.js | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/translators/wsj.js b/translators/wsj.js @@ -8,11 +8,11 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2009-07-31 11:15:00" + "lastUpdated":"2009-12-10 00:45:00" } function detectWeb(doc, url){ - return "newspaperArticle" + return "newspaperArticle"; } function getDatum(text, key){ @@ -25,10 +25,12 @@ function doWeb(doc, url){ var item = new Zotero.Item("newspaperArticle"); var metadata = text.match(/AT_VARS=({[^}]*})/)[1]; var authors = getDatum(text, "authors").split(','); - for each (var aut in authors) { - item.creators.push(Zotero.Utilities.cleanAuthor(aut, "author")); + for each (var aut in authors) { + if (aut.length > 0) { + item.creators.push(Zotero.Utilities.cleanAuthor(aut, "author")); + } } - item.publicationTitle = Zotero.Utilities.unescapeHTML(metadata.match(/publicationName:'([^'][^,]*)'/)[1]); + item.publicationTitle = "wsj.com"; item.date = getDatum(text, "publicationDate"); item.abstractNote = getDatum(text, "bodyText"); item.title = getDatum(text, "articleHeadline").replace("\\","");