From 7a12db481cb486add358cec360671253b70f0edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Fri, 11 Jul 2025 14:04:56 +0300 Subject: [PATCH] Use ESMified word processor plugin installers --- chrome/content/zotero/preferences/preferences_cite.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/preferences/preferences_cite.jsx b/chrome/content/zotero/preferences/preferences_cite.jsx index bce7323092..d42fa6fc1a 100644 --- a/chrome/content/zotero/preferences/preferences_cite.jsx +++ b/chrome/content/zotero/preferences/preferences_cite.jsx @@ -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); } }