From c29f08b5836696a6c4b81465c0c5291673b7ad36 Mon Sep 17 00:00:00 2001 From: Matt Burton Date: Mon, 1 Jun 2009 01:57:06 +0000 Subject: [PATCH] Revert "ris fix so that UR works as snapshot, reworked PLoS" This reverts commit d8aab12b0ce0b3865da400fcc2d9f839054ff98d. --- translators/PLoS Journals.js | 7 +++---- translators/RIS.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/translators/PLoS Journals.js b/translators/PLoS Journals.js index 9b059c8d10..a76ac7d212 100644 --- a/translators/PLoS Journals.js +++ b/translators/PLoS Journals.js @@ -63,17 +63,16 @@ 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 index 391d81c132..fafd993c3f 100644 --- 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, snapshot:true, mimeType:"text/html"}); + item.attachments.push({url:value}); } else if(tag == "L1") { item.attachments.push({url:value, mimeType:"application/pdf", title:"Full Text (PDF)", downloadable:true});