Use Zotero.isMac in customElements CE patch

AppConstants is occasionally undefined - not sure why.
This commit is contained in:
Abe Jellinek 2023-10-17 14:33:08 -04:00 committed by Dan Stillman
parent 810402c9c7
commit 17f758d0cf

View file

@ -65,8 +65,7 @@ Services.scriptloader.loadSubScript('chrome://zotero/content/elements/collapsibl
});
}
let isMac = AppConstants.platform == 'macosx';
if (isMac) {
if (Zotero.isMac) {
// Monkey-patch the toolbarbutton CE so it shows a native menu popup
let MozToolbarbuttonPrototype = customElements.get('toolbarbutton').prototype;
if (MozToolbarbuttonPrototype) {