Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

autoconfig use of profile-after-change

  • 1 risposta
  • 1 ha questo problema
  • 1 visualizzazione
  • Ultima risposta di cor-el

more options

Before Firefox 60, the autoconfig file (.cfg file) could register an observer for "profile-after-change" (so as to change things such as the default search engine), like this:

   Components.utils.import("resource://gre/modules/Services.jsm");
   Services.obs.addObserver(observer, "profile-after-change", false);

This no longer works (the first line fails outright). Is there a new way to register such an observer in an autoconfig file?

Before Firefox 60, the autoconfig file (.cfg file) could register an observer for "profile-after-change" (so as to change things such as the default search engine), like this: Components.utils.import("resource://gre/modules/Services.jsm"); Services.obs.addObserver(observer, "profile-after-change", false); This no longer works (the first line fails outright). Is there a new way to register such an observer in an autoconfig file?

Tutte le risposte (1)

more options

If you check the Browser Console then you will likely notice a message that "Autoconfig is sandboxed by default" (bug 1479857).

A possible workaround for now is to add a line in the autoconfig.js file disable this feature.

  • pref("general.config.sandbox_enabled", false);

Note that this pref might be removed in future Firefox versions.