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.
This commit is contained in:
Dan Stillman 2017-08-15 00:36:06 +02:00
parent 8797c7f680
commit c31f0b6b5c

View file

@ -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'));
}
});