79784070

Date: 2025-10-06 20:58:09
Score: 0.5
Natty:
Report link

It seems enough to replace the lines:

let Services = globalThis.Services || ChromeUtils.import("resource://gre/modules/Services.jsm").Services;
Cu.import("resource://gre/modules/FileUtils.jsm");

By:

const { FileUtils } = ChromeUtils.importESModule("resource://gre/modules/FileUtils.sys.mjs");

But since I am not a javascript programmer, I am not sure if something more can be removed, or if something is missing.

The answer was found while reading: https://developer.thunderbird.net/add-ons/updating/tb128

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: cacamailg