Fix empty Quick Copy locale dropdown

Closes #3254
This commit is contained in:
Abe Jellinek 2024-02-14 16:09:06 -05:00
parent 43d9d604a6
commit 0dfe276d9b

View file

@ -69,11 +69,12 @@ Zotero_Preferences.Export = {
// Initialize locale drop-down // Initialize locale drop-down
var localeMenulist = document.getElementById("zotero-quickCopy-locale-menu"); var localeMenulist = document.getElementById("zotero-quickCopy-locale-menu");
Zotero.Styles.populateLocaleList(localeMenulist); Zotero.Styles.populateLocaleList(localeMenulist);
localeMenulist.addEventListener('syncfrompreference', () => {
this._lastSelectedLocale = Zotero.Prefs.get("export.quickCopy.locale");
this.updateQuickCopyUI();
});
localeMenulist.setAttribute('preference', "extensions.zotero.export.quickCopy.locale"); localeMenulist.setAttribute('preference', "extensions.zotero.export.quickCopy.locale");
this._lastSelectedLocale = Zotero.Prefs.get("export.quickCopy.locale");
this.updateQuickCopyUI();
yield this.refreshQuickCopySiteList(); yield this.refreshQuickCopySiteList();
}), }),