www

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

commit b4848280561404257fff829412b9913c2fd746c2
parent 0f845efa5e9443663ecf63572a7cfeb8f6ea85d0
Author: Avram Lyon <ajlyon@gmail.com>
Date:   Fri,  1 Apr 2011 21:10:31 +0000

Trans: Hackless versions for Z 2.1.3+


Diffstat:
Mtranslators/BibTeX.js | 5++---
Mtranslators/RIS.js | 4+---
Mtranslators/Readability.js | 5++---
3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/translators/BibTeX.js b/translators/BibTeX.js @@ -4,7 +4,7 @@ "label":"BibTeX", "creator":"Simon Kornblith and Richard Karnesky", "target":"bib", - "minVersion":"1.0.0b4.r1", + "minVersion":"2.1.3", "maxVersion":"", "priority":200, "configOptions":{"dataMode":"block"}, @@ -1536,6 +1536,7 @@ var strings = {}; var keyRe = /[a-zA-Z0-9\-]/; function processField(item, field, value) { + if(Zotero.Utilities.trim(value) == '') return null; if(fieldMap[field]) { item[fieldMap[field]] = value; } else if(inputFieldMap[field]) { @@ -1786,8 +1787,6 @@ function beginRecord(type, closeChar) { } else if(read == closeChar) { if(item) { if(item.extra) item.extra = item.extra.substr(1); // chop \n - // hack for Zotero 2.1.1 bug (fixed in 2.1.2) - for each(var attachment in item.attachments) attachment.itemType = "attachment"; item.complete(); } return; diff --git a/translators/RIS.js b/translators/RIS.js @@ -4,7 +4,7 @@ "label":"RIS", "creator":"Simon Kornblith", "target":"ris", - "minVersion":"2.1b6", + "minVersion":"2.1.3", "maxVersion":"", "priority":100, "inRepository":true, @@ -368,8 +368,6 @@ function completeItem(item) { if(item.journalAbbreviation && !item.publicationTitle){ item.publicationTitle = item.journalAbbreviation; } - // hack for Zotero 2.1.1 bug (fixed in 2.1.2) - for each(var attachment in item.attachments) attachment.itemType = "attachment"; item.complete(); } diff --git a/translators/Readability.js b/translators/Readability.js @@ -3,7 +3,7 @@ "label": "Readability", "creator": "Avram Lyon", "target": "^https?://www\\.readability\\.com/articles", - "minVersion": "1.0", + "minVersion": "2.1.3", "maxVersion": "", "priority": 100, "inRepository": "0", @@ -74,7 +74,6 @@ function doWeb(doc, url){ if(time) item.date = time.textContent; // We snapshot the page, using the existing document - // TODO Eliminate the itemType:"attachment" when Z 2.1.2 is released - item.attachments = [{itemType:"attachment", document:doc, title:"Readability Snapshot"}] + item.attachments = [{document:doc, title:"Readability Snapshot"}] item.complete(); }