commit e7fa518f500f50d068f88652621ba09e69ef0124
parent 3777004652906ce23c45b8ab137f553393c25a63
Author: Matt Burton <mcburton@gmail.com>
Date: Mon, 1 Jun 2009 01:57:00 +0000
ris fix so that UR works as snapshot, reworked PLoS
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/translators/PLoS Journals.js b/translators/PLoS Journals.js
@@ -63,16 +63,17 @@ function doWeb(doc, url) {
doi = doi.replace("%2F","/");//Replace %2F characters by forward slashes in doi
// grab the UR link for a snapshot then blow it away
- var snapshot = text.match(/UR\s+\-\s+(.*)/)[1];
- text = text.replace(/UR\s+\-(.*)/, "");
+ //var snapshot = text.match(/UR\s+\-\s+(.*)/)[1];
+ //text = text.replace(/UR\s+\-(.*)/, "");
var translator = Zotero.loadTranslator("import");
translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7");
translator.setString(text);
translator.setHandler("itemDone", function(obj, item) {
//item.attachments[0]=({url:pdfURL, title:"PLoS Full Text PDF", mimeType:"application/pdf"});
+ //item.url = snapshot;
item.attachments.push({url:pdfURL, title:"PLoS Full Text PDF", mimeType:"application/pdf"});
- item.attachments.push({url:snapshot, title:"PLoS Snapshot", mimeType:"text/html", snapshot:true});
+ //item.attachments.push({url:snapshot, title:"PLoS Snapshot", mimeType:"text/html", snapshot:true});
item.DOI = doi;
item.repository = item.publicationTitle;
item.complete();
diff --git a/translators/RIS.js b/translators/RIS.js
@@ -252,7 +252,7 @@ function processTag(item, tag, value) {
item.url = value;
}
if(tag == "UR") {
- item.attachments.push({url:value});
+ item.attachments.push({url:value, snapshot:true, mimeType:"text/html"});
} else if(tag == "L1") {
item.attachments.push({url:value, mimeType:"application/pdf",
title:"Full Text (PDF)", downloadable:true});