commit c31f0b6b5ccecfa5a91e7fefa4232a7905c92097
parent 8797c7f6804ee1f2127436982acf9b5fd4db6636
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 15 Aug 2017 00:36:06 +0200
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.
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git 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'));
+ }
+});