fx140: Use import statements in MJS files

This commit is contained in:
Abe Jellinek 2025-07-02 09:51:42 -04:00 • committed by Dan Stillman
parent c434ec40dd
commit bb8a8a4362
6 changed files with 7 additions and 8 deletions

View file

@ -24,9 +24,8 @@
*/
const { BlockingObserver } = ChromeUtils.importESModule("chrome://zotero/content/BlockingObserver.mjs");
ChromeUtils.importESModule("chrome://zotero/content/actors/ActorManager.mjs");
import { BlockingObserver } from "chrome://zotero/content/BlockingObserver.mjs";
import "chrome://zotero/content/actors/ActorManager.mjs";
/* global HiddenFrame, E10SUtils */
ChromeUtils.defineESModuleGetters(globalThis, {

View file

@ -23,7 +23,7 @@
***** END LICENSE BLOCK *****
*/
var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
import { Zotero } from "chrome://zotero/content/zotero.mjs";
// Helper functions for citationDialog.js
export class CitationDialogHelpers {

View file

@ -23,7 +23,7 @@
***** END LICENSE BLOCK *****
*/
var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
import { Zotero } from "chrome://zotero/content/zotero.mjs";
// Keyboard handler for citationDialog
export class CitationDialogKeyboardHandler {

View file

@ -23,7 +23,7 @@
***** END LICENSE BLOCK *****
*/
var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
import { Zotero } from "chrome://zotero/content/zotero.mjs";
// Handle the logic of opening popups and saving/discarding edits to the citation items
export class CitationDialogPopupsHandler {

View file

@ -23,7 +23,7 @@
***** END LICENSE BLOCK *****
*/
var { Zotero } = ChromeUtils.importESModule("chrome://zotero/content/zotero.mjs");
import { Zotero } from "chrome://zotero/content/zotero.mjs";
const MIN_QUERY_LENGTH = 2;

View file

@ -159,7 +159,7 @@ const xpcomFilesLocal = [
'translation/translators',
];
const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/content/modules/commandLineOptions.mjs");
import { CommandLineOptions } from "chrome://zotero/content/modules/commandLineOptions.mjs";
var instanceID = (new Date()).getTime();
var isFirstLoadThisSession = true;