Skip to content
Permalink
Browse files

🎨 Spaces around keywords (#1717)

Search and replace some cases to add spaces around
keywords: if, else, for, while, switch.

(Excluding FW code and translators with an open pull request.)
  • Loading branch information...
zuphilip authored and adam3smith committed Aug 20, 2018
1 parent 2fa6a0f commit 2d3e4bdbaa217b31eee10591e84d6afb0cd2efb2
Showing with 3,003 additions and 3,003 deletions.
  1. +1 −1 ACLWeb.js
  2. +1 −1 ACM Digital Library.js
  3. +19 −19 ACS Publications.js
  4. +13 −13 AIP.js
  5. +6 −6 AMS MathSciNet.js
  6. +1 −1 APA PsycNET.js
  7. +6 −6 APS.js
  8. +1 −1 ARTFL Encyclopedie.js
  9. +6 −6 ASCE.js
  10. +8 −8 Access Medicine.js
  11. +22 −22 Airiti.js
  12. +1 −1 Alexander Street Press.js
  13. +1 −1 AllAfrica.js
  14. +52 −52 Amazon.js
  15. +6 −6 American Institute of Aeronautics and Astronautics.js
  16. +25 −25 Ancestry.com US Federal Census.js
  17. +12 −12 Annual Reviews.js
  18. +4 −4 BAILII.js
  19. +4 −4 BBC.js
  20. +6 −6 BIBSYS.js
  21. +1 −1 BOCC.js
  22. +14 −14 BibLaTeX.js
  23. +149 −149 BibTeX.js
  24. +113 −113 Bibliontology RDF.js
  25. +2 −2 BioOne.js
  26. +25 −25 Bookmarks.js
  27. +2 −2 CCfr (BnF).js
  28. +26 −26 CNKI.js
  29. +21 −21 COinS.js
  30. +7 −7 CSL JSON.js
  31. +1 −1 CSV.js
  32. +1 −1 CanLII.js
  33. +1 −1 Canadian Letters and Images.js
  34. +25 −25 Cell Press.js
  35. +3 −3 Chadwyck Literature Online.js
  36. +2 −2 Citavi 5 XML.js
  37. +17 −17 Clinical Key.js
  38. +1 −1 Columbia University Press.js
  39. +1 −1 Common-Place.js
  40. +9 −9 Cornell LII.js
  41. +1 −1 Cornell University Press.js
  42. +46 −46 CrossRef.js
  43. +2 −2 Crossref-REST.js
  44. +1 −1 DAI-Zenon.js
  45. +3 −3 DBLP Computer Science Bibliography.js
  46. +1 −1 DEPATISnet.js
  47. +14 −14 DOI.js
  48. +1 −1 DPLA.js
  49. +2 −2 DTU Orbit.js
  50. +7 −7 Dagens Nyheter.js
  51. +16 −16 DataCite.js
  52. +8 −8 DeGruyter.js
  53. +2 −2 Digital Medievalist.js
  54. +1 −1 Douban.js
  55. +11 −11 EIDR.js
  56. +3 −3 EPA National Library Catalog.js
  57. +16 −16 ESpacenet.js
  58. +1 −1 Edinburgh University Press Journals.js
  59. +7 −7 Education Week.js
  60. +3 −3 Electronic Colloquium on Computational Complexity.js
  61. +4 −4 Elsevier Health Journals.js
  62. +31 −31 Endnote XML.js
  63. +2 −2 Engineering Village.js
  64. +3 −3 Euclid.js
  65. +4 −4 Evernote.js
  66. +7 −7 Factiva.js
  67. +1 −1 Flickr.js
  68. +1 −1 Foreign Policy.js
  69. +1 −1 FreeCite.js
  70. +1 −1 FreePatentsOnline.js
  71. +3 −3 GPO Access e-CFR.js
  72. +20 −20 Galegroup.js
  73. +6 −6 Gene Ontology.js
  74. +5 −5 Gmail.js
  75. +34 −34 Google Books.js
  76. +1 −1 Google Patents.js
  77. +4 −4 Google Scholar.js
  78. +1 −1 HAL Archives Ouvertes.js
  79. +1 −1 HLAS (historical).js
  80. +5 −5 Haaretz.js
  81. +5 −5 Hathi Trust.js
  82. +46 −46 HighWire 2.0.js
  83. +28 −28 HighWire.js
  84. +1 −1 Hindawi Publishers.js
  85. +1 −1 Huff Post.js
  86. +1 −1 IEEE Computer Society.js
  87. +1 −1 IEEE Xplore.js
  88. +1 −1 IMDb.js
  89. +54 −54 InfoTrac.js
  90. +1 −1 Informit Australia.js
  91. +1 −1 IngentaConnect.js
  92. +11 −11 Insignia OPAC.js
  93. +28 −28 Intellixir.js
  94. +1 −1 Internet Archive Wayback Machine.js
  95. +9 −9 Isidore.js
  96. +2 −2 JSTOR.js
  97. +10 −10 Jahrbuch.js
  98. +1 −1 KitapYurdu.com.js
  99. +18 −18 Library Catalog (Aleph).js
  100. +15 −15 Library Catalog (Amicus).js
  101. +1 −1 Library Catalog (Aquabrowser).js
  102. +1 −1 Library Catalog (BiblioCommons).js
  103. +2 −2 Library Catalog (Capita Prism).js
  104. +1 −1 Library Catalog (DRA).js
  105. +11 −11 Library Catalog (Dynix).js
  106. +9 −9 Library Catalog (GEAC).js
  107. +20 −20 Library Catalog (InnoPAC).js
  108. +1 −1 Library Catalog (Koha).js
  109. +9 −9 Library Catalog (Mango).js
  110. +40 −40 Library Catalog (PICA).js
  111. +1 −1 Library Catalog (Polaris).js
  112. +65 −65 Library Catalog (SIRSI).js
  113. +2 −2 Library Catalog (SLIMS).js
  114. +1 −1 Library Catalog (Voyager 7).js
  115. +22 −22 Lulu.js
  116. +38 −38 MAB2.js
  117. +52 −52 MARC.js
  118. +7 −7 MEDLINEnbib.js
  119. +158 −158 MODS.js
  120. +2 −2 Mailman.js
  121. +13 −13 MetaLib.js
  122. +1 −1 Microsoft Academic.js
  123. +2 −2 NASA NTRS.js
  124. +1 −1 NRC Research Press.js
  125. +3 −3 National Archives of Australia.js
  126. +1 −1 National Diet Library Catalogue.js
  127. +2 −2 National Library of Norway.js
  128. +69 −69 Nature Publishing Group.js
  129. +2 −2 Neural Information Processing Systems.js
  130. +18 −18 Nuclear Receptor Signaling.js
  131. +40 −40 OCLC WorldCat FirstSearch.js
  132. +2 −2 OECD.js
  133. +1 −1 OVID Tagged.js
  134. +3 −3 Open Journal Systems.js
  135. +18 −18 Open WorldCat.js
  136. +4 −4 OpenEdition Books.js
  137. +1 −1 Ovid.js
  138. +1 −1 Oxford University Press.js
  139. +5 −5 Patents - USPTO.js
  140. +1 −1 PhilPapers.js
  141. +10 −10 Pleade.js
  142. +18 −18 Primo Normalized XML.js
  143. +22 −22 Primo.js
  144. +37 −37 ProQuest.js
  145. +4 −4 PubMed Central.js
  146. +43 −43 PubMed XML.js
  147. +31 −31 PubMed.js
  148. +104 −104 RDF.js
  149. +211 −211 RIS.js
  150. +8 −8 RSC Publishing.js
  151. +2 −2 Radio Free Europe Radio Liberty.js
  152. +112 −112 RefWorks Tagged.js
  153. +43 −43 ReferBibIX.js
  154. +1 −1 ResearchGate.js
  155. +12 −12 Revues.org.js
  156. +1 −1 SAGE Knowledge.js
  157. +10 −10 SFU IPinCH.js
  158. +3 −3 SSOAR.js
  159. +3 −3 SSRN.js
  160. +12 −12 Safari Books Online.js
  161. +6 −6 Scholars Portal Journals.js
  162. +1 −1 SciELO.js
  163. +1 −1 ScienceDirect.js
  164. +1 −1 Semantic Scholar.js
  165. +2 −2 Silverchair.js
  166. +4 −4 SlideShare.js
  167. +1 −1 Spiegel Online.js
  168. +30 −30 Springer Link.js
  169. +1 −1 Stanford Encyclopedia of Philosophy.js
  170. +7 −7 Stuff.co.nz.js
  171. +4 −4 Sueddeutsche.de.js
  172. +1 −1 Summon 2.js
  173. +2 −2 Sveriges radio.js
  174. +1 −1 TV by the Numbers.js
  175. +1 −1 Talis Aspire.js
  176. +6 −6 TalisPrism.js
  177. +2 −2 Tatknigafund.js
  178. +7 −7 Taylor and Francis+NEJM.js
  179. +4 −4 The Chronicle of Higher Education.js
  180. +2 −2 The Economic Times.js
  181. +1 −1 The Globe and Mail.js
  182. +2 −2 The Met.js
  183. +3 −3 TheMarker.js
  184. +9 −9 Treesearch.js
  185. +1 −1 Twitter.js
  186. +1 −1 UPCommons.js
  187. +10 −10 Ubiquity Journals.js
  188. +1 −1 University of Wisconsin-Madison Libraries Catalog.js
  189. +21 −21 Unqualified Dublin Core RDF.js
  190. +1 −1 WIPO.js
  191. +10 −10 Wanfang Data.js
  192. +16 −16 Web of Science Tagged.js
  193. +16 −16 Web of Science.js
  194. +67 −67 Wikipedia Citation Templates.js
  195. +5 −5 Wikipedia.js
  196. +5 −5 Wildlife Biology in Practice.js
  197. +36 −36 Wiley Online Library.js
  198. +8 −8 World History Connected.js
  199. +118 −118 Zotero RDF.js
  200. +14 −14 arXiv.org.js
  201. +1 −1 beck-online.js
  202. +6 −6 dLibra.js
  203. +3 −3 eLibrary.ru.js
  204. +6 −6 eLife.js
  205. +1 −1 eMedicine.js
  206. +3 −3 ePrint IACR.js
  207. +1 −1 fishpond.co.nz.js
  208. +1 −1 informIT database.js
  209. +1 −1 io-port.js
  210. +45 −45 mEDRA.js
  211. +1 −1 semantics Visual Library.js
  212. +34 −34 unAPI.js
  213. +9 −9 wiso.js
  214. +7 −7 zbMATH.js
  215. +5 −5 zotero.org.js
@@ -65,7 +65,7 @@ function doWeb(doc, url) {
}
});
});
} else if(url.endsWith('.bib')) {
} else if (url.endsWith('.bib')) {
// e.g. http://www.aclweb.org/anthology/P10-4014.bib
let bibtex = ZU.xpath(doc, '//pre')[0].textContent;
scrapeBibtex(bibtex, url);
@@ -132,7 +132,7 @@ function scrape(doc) {
delete item.archiveLocation;

// some bibtext contains odd </kwd> tags - remove them
for(var i=0; i<item.tags.length; i++) {
for (var i=0; i<item.tags.length; i++) {
item.tags[i] = item.tags[i].replace("</kwd>", "");
}

@@ -15,7 +15,7 @@
function getSearchResults(doc, checkOnly, itemOpts) {
var items = {}, found = false;
var titles = doc.getElementsByClassName('titleAndAuthor');
for(var i=0; i<titles.length; i++){
for (var i=0; i<titles.length; i++){
var a = ZU.xpath(titles[i], './/h2//a')[0];
if (!a) continue;

@@ -37,7 +37,7 @@ function getSearchResults(doc, checkOnly, itemOpts) {
continue;
}

if(ZU.xpath(articleBox, './/a[text()="Supporting Info"]').length) {
if (ZU.xpath(articleBox, './/a[text()="Supporting Info"]').length) {
itemOpts[doi].hasSupp = true;
}

@@ -52,9 +52,9 @@ function getSearchResults(doc, checkOnly, itemOpts) {
function getDoi(url) {
var m = url.match(/https?:\/\/[^\/]*\/doi\/(?:abs\/|full\/)?(10\.[^\?#]+)/);

if(m) {
if (m) {
var doi = m[1];
if(doi.indexOf("prevSearch") != -1) {
if (doi.indexOf("prevSearch") != -1) {
doi = doi.substring(0,doi.indexOf("?"));
}
return decodeURIComponent(doi);
@@ -68,7 +68,7 @@ function getDoi(url) {
function getSuppFiles(div) {
var fileNames = ZU.xpath(div, './/li//li');
var attach = [];
for(var i=0, n=fileNames.length; i<n; i++) {
for (var i=0, n=fileNames.length; i<n; i++) {
attach.push(fileNames[i].textContent.trim().replace(/\s[\s\S]+/, ''));
}
return attach;
@@ -88,16 +88,16 @@ function getSuppMimeType(fileName) {
}

function attachSupp(item, doi, opts) {
if(!opts.attach) return;
if(!item.attachments) item.attachments = [];
if (!opts.attach) return;
if (!item.attachments) item.attachments = [];
var attachment;
for(var i=0, n=opts.attach.length; i<n; i++) {
for (var i=0, n=opts.attach.length; i<n; i++) {
attachment = {
title: opts.attach[i]
};
attachment.url = '/doi/suppl/' + doi + '/suppl_file/' + attachment.title;
attachment.mimeType = getSuppMimeType(attachment.title);
if(opts.attachAsLink || !attachment.mimeType) { //don't download unknown file types
if (opts.attachAsLink || !attachment.mimeType) { //don't download unknown file types
attachment.snapshot = false;
}

@@ -116,7 +116,7 @@ function detectWeb(doc, url) {
return "multiple";
} else if (getDoi(url)) {
var type = doc.getElementsByClassName("manuscriptType");
if(type.length && type[0].textContent.indexOf("Chapter") !=-1) {
if (type.length && type[0].textContent.indexOf("Chapter") !=-1) {
return "bookSection";
} else {
return "journalArticle";
@@ -131,7 +131,7 @@ function doWeb(doc, url){
opts.attachSupp = Z.getHiddenPref("attachSupplementary");
opts.attachAsLink = Z.getHiddenPref("supplementaryAsLink");
var highResPDF = Z.getHiddenPref("ACS.highResPDF"); //attach high res PDF?
if(highResPDF) {
if (highResPDF) {
opts.highResPDF = true;
opts.removePdfPlus = highResPDF === 1; //it can also be 2, which would mean attach both versions
}
@@ -156,7 +156,7 @@ function doWeb(doc, url){
Zotero.debug("DOI= "+doi);
//we can determine file names from the tooltip, which saves us an HTTP request
var suppTip = doc.getElementById('suppTipDiv');
if(opts.attachSupp && suppTip) {
if (opts.attachSupp && suppTip) {
try {
opts.attach = getSuppFiles(suppTip, opts);
} catch(e) {
@@ -167,7 +167,7 @@ function doWeb(doc, url){

//if we couldn't find this on the individual item page,
//then it doesn't have supp info anyway. This way we know not to check later
if(!opts.attach) opts.attach = [];
if (!opts.attach) opts.attach = [];

// See if we have pdfplus
var div = doc.getElementsByClassName('fulltext-formats')[0];
@@ -180,7 +180,7 @@ function doWeb(doc, url){
}

function scrape(items, opts){
for(var i=0, n=items.length; i<n; i++) {
for (var i=0, n=items.length; i<n; i++) {
processCallback(items[i], opts);
}
}
@@ -195,7 +195,7 @@ function processCallback(fetchItem, opts, downloadFileName) {
// Fix the wrong mapping for journal abbreviations
text = text.replace("\nJO -", "\nJ2 -");
// Use publication date when available
if(text.indexOf("\nDA -") !== -1) {
if (text.indexOf("\nDA -") !== -1) {
text = text.replace(/\nY1 - [^\n]*/, "")
.replace("\nDA -", "\nY1 -");
}
@@ -234,14 +234,14 @@ function processCallback(fetchItem, opts, downloadFileName) {

//supplementary data
try {
if(opts.attachSupp && opts.attach) {
if (opts.attachSupp && opts.attach) {
//came from individual item page
attachSupp(item, doi, opts);
} else if(opts.attachSupp && fetchItem.opts.hasSupp) {
} else if (opts.attachSupp && fetchItem.opts.hasSupp) {
//was a search result and has supp info
var suppUrl = '/doi/suppl/' + doi;

if(opts.attachAsLink) {
if (opts.attachAsLink) {
//if we're only attaching links, it's not worth linking to each doc
item.attachments.push({
title: "Supporting Information",
@@ -253,7 +253,7 @@ function processCallback(fetchItem, opts, downloadFileName) {
ZU.processDocuments(suppUrl, function(suppDoc) {
try {
var div = suppDoc.getElementById('supInfoBox');
if(div) {
if (div) {
var files = getSuppFiles(div);
attachSupp(item, doi, {
attach: files,
26 AIP.js
@@ -17,29 +17,29 @@ function getSearchResults(doc) {
}

function detectWeb(doc, url) {
if(url.indexOf('search') !== -1 && getSearchResults(doc).length) {
if (url.indexOf('search') !== -1 && getSearchResults(doc).length) {
return 'multiple';
}

if(ZU.xpathText(doc, '/html/head/meta[@name="citation_journal_title"]/@content')) {
if (ZU.xpathText(doc, '/html/head/meta[@name="citation_journal_title"]/@content')) {
return 'journalArticle';
}
else if(doc.body.id == 'conferencepaper') return "conferencePaper"
else if (doc.body.id == 'conferencepaper') return "conferencePaper"
}
function doWeb(doc, url) {
if(detectWeb(doc, url) == 'multiple') {
if (detectWeb(doc, url) == 'multiple') {
var results = getSearchResults(doc);
var items = {};
for(var i=0, n=results.length; i<n; i++) {
for (var i=0, n=results.length; i<n; i++) {
var title = ZU.xpath(results[i], './/div[@class="title"]/a')[0];
items[title.href] = ZU.trimInternal(title.textContent);
}

Z.selectItems(items, function(selectedItems) {
if(!selectedItems) return true;
if (!selectedItems) return true;

var urls = [];
for(var i in selectedItems) {
for (var i in selectedItems) {
urls.push(i);
}

@@ -58,22 +58,22 @@ function scrape(doc, url) {

translator.setHandler('itemDone', function(obj, item) {
//for conference papers, we're missing some metadata
if(!item.publicationTitle
if (!item.publicationTitle
&& ZU.xpath(doc, '//div[@id="breadcrumb"]/a[@title="Link to conference proceedings"]').length) {
item.publicationTitle = "AIP Conference Proceedings";
item.volume = ZU.xpathText(doc, '//div[@class="itemCitation"]//span[@class="citationvolume"]');
}

//check if we have the correct publication date
var year = doc.getElementsByClassName('itemCitation')[0];
if(year) year = year.textContent.match(/\((\d{4})\)/);
if(year && (!item.date || item.date.indexOf(year[1]) == -1) ) {
if (year) year = year.textContent.match(/\((\d{4})\)/);
if (year && (!item.date || item.date.indexOf(year[1]) == -1) ) {
item.date = year[1];
}


var pdf = ZU.xpath(doc, '//div[@class="pdfItem"]/a[@class="pdf" and @href]')[0];
if(pdf) {
if (pdf) {
item.attachments.push({
title: "Full Text PDF",
url: pdf.href,
@@ -83,10 +83,10 @@ function scrape(doc, url) {

var keywords = ZU.xpath(doc, '//div[@class="keywords-container"]//dt/a');
var tags = [];
for(var i=0, n=keywords.length; i<n; i++) {
for (var i=0, n=keywords.length; i<n; i++) {
tags.push(ZU.trimInternal(keywords[i].textContent));
}
if(tags.length) {
if (tags.length) {
item.tags = tags;
}

@@ -15,10 +15,10 @@
function detectWeb(doc, url) {

var itemType;
if(getSearchResults(doc, true)) {
if (getSearchResults(doc, true)) {
return "multiple"
} else if(itemType = ZU.xpathText(doc, '//div[@class="headlineMenu"]/*[last()-1]')) {
switch(itemType.trim().toLowerCase()) {
} else if (itemType = ZU.xpathText(doc, '//div[@class="headlineMenu"]/*[last()-1]')) {
switch (itemType.trim().toLowerCase()) {
case 'article':
return "journalArticle";
case 'book':
@@ -77,7 +77,7 @@ function scrape(doc, url) {
var bibTeXString = "";

var m;
while(m = preRE.exec(text)) {
while (m = preRE.exec(text)) {
bibTeXString += m[1] + '\n';
}

@@ -88,15 +88,15 @@ function scrape(doc, url) {
translator.setHandler("itemDone", function(obj, item) {
// Fix/fetch MR number
var mrnumber;
if(item.extra) {
if (item.extra) {
item.extra = item.extra.replace(/^MR:\s*(?:MR)?(\d+).*/gm,
function(m, mr) {
mrnumber = mr;
return 'MR: ' + mr;
});
}

if(mrnumber) {
if (mrnumber) {
url = 'https://mathscinet.ams.org/mathscinet-getitem?mr=' + mrnumber;
}
item.attachments.push({title: "MathSciNet Snapshot", document: doc});
@@ -234,7 +234,7 @@ function getIds(doc, url) {
* we can fetch the id from the url
* alternatively, the id is in a javascript section (this is messy)
*/
if(url.includes('/buy/')) {
if (url.includes('/buy/')) {
let m = url.match(/\/buy\/([\d\-]*)/);
if (m) {
return m[1];
12 APS.js
@@ -14,9 +14,9 @@

function detectWeb(doc, url) {
var title = doc.getElementById('title');
if(title && ZU.xpath(title, './/a[@id="export-article-link"]').length) {
if (title && ZU.xpath(title, './/a[@id="export-article-link"]').length) {
return "journalArticle";
} else if(getSearchResults(doc, true)){
} else if (getSearchResults(doc, true)){
return "multiple";
}
}
@@ -110,7 +110,7 @@ function scrape(doc, url) {
));

// attach PDF
if(ZU.xpath(doc, '//div[@class="article-nav-actions"]/a[contains(text(), "PDF")]').length) {
if (ZU.xpath(doc, '//div[@class="article-nav-actions"]/a[contains(text(), "PDF")]').length) {
item.attachments.push({
title: 'Full Text PDF',
url: url.replace('{REPLACE}', 'pdf'),
@@ -123,17 +123,17 @@ function scrape(doc, url) {
document: doc
});

if(Z.getHiddenPref && Z.getHiddenPref('attachSupplementary')) {
if (Z.getHiddenPref && Z.getHiddenPref('attachSupplementary')) {
ZU.processDocuments(url.replace('{REPLACE}', 'supplemental'), function(doc) {
try {
var asLink = Z.getHiddenPref('supplementaryAsLink');
var suppFiles = doc.getElementsByClassName('supplemental-file');
for(var i=0; i<suppFiles.length; i++) {
for (var i=0; i<suppFiles.length; i++) {
var link = suppFiles[i].getElementsByTagName('a')[0];
if (!link || !link.href) continue;
var title = link.getAttribute('data-id') || 'Supplementary Data';
var type = suppTypeMap[link.href.split('.').pop()];
if(asLink || dontDownload.indexOf(type) != -1) {
if (asLink || dontDownload.indexOf(type) != -1) {
item.attachments.push({
title: title,
url: link.href,
@@ -67,7 +67,7 @@ function reconcileAuthor(author){
Le Roy
*/
}
if(authorMap[author]) {
if (authorMap[author]) {
author = authorMap[author];
}
// remove ARTFL's trailing 5 for odd contributors (e.g. Turgot5)
12 ASCE.js
@@ -46,7 +46,7 @@ function getTitles(doc) {
function detectWeb(doc, url) {
/* if (url.match(/\/doi\/abs\/10\.|\/doi\/full\/10\./)) {
return "journalArticle";
} else if(url.match(/\/action\/doSearch\?|\/toc\//))
} else if (url.match(/\/action\/doSearch\?|\/toc\//))
{
return "multiple";
} */
@@ -60,15 +60,15 @@ function doWeb(doc, url) {
var items = new Object();
var titles = getTitles(doc);
var doi;
for(var i=0, n=titles.length; i<n; i++) {
for (var i=0, n=titles.length; i<n; i++) {
doi = titles[i].href.match(/\/doi\/(?:abs|full)\/(10\.[^?#]+)/);
if(doi) {
if (doi) {
items[doi[1]] = titles[i].textContent;
}
}

Zotero.selectItems(items, function(selectedItems){
if(!selectedItems) return true;
if (!selectedItems) return true;

var dois = new Array();
for (var i in selectedItems) {
@@ -92,7 +92,7 @@ function finalizeItem(item, doc, doi, baseUrl) {
url: pdfurl + doi,
mimeType: 'application/pdf'
}];
if(doc) {
if (doc) {
item.attachments.push({
title: 'Snapshot',
document: doc
@@ -118,7 +118,7 @@ function scrape(doc, url, dois) {
var risFormat = '&format=ris';
var bibtexFormat = '&format=bibtex';

for(var i=0, n=dois.length; i<n; i++) {
for (var i=0, n=dois.length; i<n; i++) {
(function(doi) {
ZU.doPost(postUrl, postBody + doi + bibtexFormat, function(text) {
var translator = Zotero.loadTranslator("import");
Oops, something went wrong.

0 comments on commit 2d3e4bd

Please sign in to comment.
You can’t perform that action at this time.