From c31f0b6b5ccecfa5a91e7fefa4232a7905c92097 Mon Sep 17 00:00:00 2001 From: Dan Stillman <dstillman@zotero.org> Date: Tue, 15 Aug 2017 00:36:06 +0200 Subject: [PATCH] Fix <label class="text-link"/> in basic viewer (e.g., Add-ons pane) I'm not sure when this stopped working, or whether the Add-ons pane was in the basic viewer before, but that fixes it. --- chrome/content/zotero/standalone/basicViewer.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chrome/content/zotero/standalone/basicViewer.js b/chrome/content/zotero/standalone/basicViewer.js index f1ab4f1df..f3ff1cdcf 100644 --- a/chrome/content/zotero/standalone/basicViewer.js +++ b/chrome/content/zotero/standalone/basicViewer.js @@ -55,3 +55,11 @@ window.addEventListener("keypress", function (event) { browser.reloadWithFlags(browser.webNavigation.LOAD_FLAGS_BYPASS_CACHE); } }); + +// Handle <label class="text-link /> +window.addEventListener("click", function (event) { + if (event.originalTarget.localName == 'label' + && event.originalTarget.classList.contains('text-link')) { + Zotero.launchURL(event.originalTarget.getAttribute('href')); + } +});