Skip to content

Commit

Permalink
Fixes #128: Always relying on globalThis.Services existing.
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroz committed Jul 29, 2024
1 parent b030056 commit 01bf845
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/chrome/content/bidimailui-common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EXPORTED_SYMBOLS = [ "BiDiMailUI" ];
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
const { XPCOMUtils } = ChromeUtils.importESModule("resource://gre/modules/XPCOMUtils.sys.mjs");

var BiDiMailUI = { };
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/content/bidimailui-composer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
var { MailServices } = ChromeUtils.importESModule("resource:///modules/MailServices.sys.mjs");
var { BiDiMailUI } = ChromeUtils.import("chrome://bidimailui/content/bidimailui-common.js");

Expand Down
2 changes: 1 addition & 1 deletion src/chrome/content/bidimailui-editor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
const { BiDiMailUI } = ChromeUtils.import("chrome://bidimailui/content/bidimailui-common.js");

BiDiMailUI.Editor = {};
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/content/bidimailui-messenger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
var { BiDiMailUI } = ChromeUtils.import("chrome://bidimailui/content/bidimailui-common.js");

// This file constains UI and glue code only, calling
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/content/overlay-injectors/3pane.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
var { BiDiMailUI } = ChromeUtils.import("chrome://bidimailui/content/bidimailui-common.js");

// Note: There are some duplicates with injections from messenger.js, as those are not (easily) accessible
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/content/overlay-injectors/messenger.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
var { BiDiMailUI } = ChromeUtils.import("chrome://bidimailui/content/bidimailui-common.js");

// Note: There are some duplicates with injections from 3pane.js, as those are not (easily) accessible
Expand Down
2 changes: 1 addition & 1 deletion src/chrome/content/overlay-injectors/messengercompose.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Services = globalThis.Services || ChromeUtils.importESModule("resource://gre/modules/Services.sys.mjs").Services;
var Services = globalThis.Services;
var { BiDiMailUI } = ChromeUtils.import("chrome://bidimailui/content/bidimailui-common.js");

const debugInjection = false;
Expand Down

0 comments on commit 01bf845

Please # to comment.