From b8c1b7c13982ac048f2998eadd9ced8dcecb2537 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Mon, 29 Jan 2024 13:18:13 -0500 Subject: [PATCH] Fix DOI View Online/Copy as URL regression Was opening/copying the bare DOI, not the URL. --- chrome/content/zotero/elements/itemBox.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/elements/itemBox.js b/chrome/content/zotero/elements/itemBox.js index 804d344300..d8b09b301b 100644 --- a/chrome/content/zotero/elements/itemBox.js +++ b/chrome/content/zotero/elements/itemBox.js @@ -592,6 +592,7 @@ valueElement.setAttribute('aria-labelledby', label.id); } let openLinkButton; + let link = val; let addContextMenu = false; // TEMP - NSF (homepage) if ((fieldName == 'url' || fieldName == 'homepage') @@ -612,6 +613,7 @@ .replace(/%/g, '%25') .replace(/"/g, '%22'); openLinkButton = this.createOpenLinkIcon(doi); + link = doi; addContextMenu = true; } } @@ -622,7 +624,6 @@ rowData.appendChild(openLinkButton); } if (addContextMenu) { - let link = val; rowData.oncontextmenu = (event) => { this._linkMenu.dataset.link = link; document.popupNode = rowLabel.parentElement;