Use ESMified word processor plugin installers

This commit is contained in:
Adomas Venčkauskas 2025-07-11 14:04:56 +03:00 • committed by Dan Stillman
parent 601a1f2292
commit 19903271ce

View file

@ -54,9 +54,10 @@ Zotero_Preferences.Cite = {
for (let wordPlugin of wordPlugins) {
// This is the weirdest indirect code, but let's not fix what's not broken
try {
var installer = Components.utils.import(`resource://${this.wordPluginResourcePaths[wordPlugin]}/installer.jsm`).Installer;
(new installer(true)).showPreferences(document);
} catch(e) {
const { Installer } = ChromeUtils.importESModule(`resource://${this.wordPluginResourcePaths[wordPlugin]}/installer.mjs`);
(new Installer(true)).showPreferences(document);
}
catch (e) {
Zotero.logError(e);
}
}