Skip to content

Commit

Permalink
Merge pull request #10 from arai-a/services-global
Browse files Browse the repository at this point in the history
Use Services global variable if possible
  • Loading branch information
moisseev authored Jun 30, 2023
2 parents b71492a + fa37e56 commit 04cdbee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions experiments/displayReceivedHeader.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* global ChromeUtils */
/* global ChromeUtils, globalThis */
/* exported displayReceivedHeader */

"use strict";

const {ExtensionCommon} = ChromeUtils.import("resource://gre/modules/ExtensionCommon.jsm");
const {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
const Services = globalThis.Services || ChromeUtils.import("resource://gre/modules/Services.jsm").Services;
const [majorVersion] = Services.appinfo.platformVersion.split(".", 1);

// eslint-disable-next-line no-var
Expand Down

0 comments on commit 04cdbee

Please sign in to comment.