From 5ea5bba82724d0161f5bdf7b463ac35f30e7b82b Mon Sep 17 00:00:00 2001 From: anthainguyen38 Date: Fri, 26 Feb 2021 07:39:54 -0600 Subject: [PATCH 1/2] add number to data links if multiple --- zotero.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/zotero.js b/zotero.js index e64d85f..8ec34e4 100644 --- a/zotero.js +++ b/zotero.js @@ -155,8 +155,13 @@ function parseZoteroResults(resultText) { var links = [] for (var i = 0; i < dois.length; i++) { var doi = dois[i]; + var j = i + 1 if (doi.startsWith("https://doi.org/")) { - links.push(' Data link.'); + if (dois.length == 1) { + + } else { + links.push(' Data link ' + j + '.'); + } } } return links.join(" "); From eb2a8213b65cfe096ebab0d8a37f8522b5dd73d9 Mon Sep 17 00:00:00 2001 From: anthainguyen38 Date: Fri, 26 Feb 2021 08:21:46 -0600 Subject: [PATCH 2/2] fix typo --- zotero.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zotero.js b/zotero.js index 8ec34e4..28a5558 100644 --- a/zotero.js +++ b/zotero.js @@ -158,7 +158,7 @@ function parseZoteroResults(resultText) { var j = i + 1 if (doi.startsWith("https://doi.org/")) { if (dois.length == 1) { - + links.push(' Data link.'); } else { links.push(' Data link ' + j + '.'); }