This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Cari Bantuan

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Pelajari Lebih Lanjut

autoconfig use of profile-after-change

  • 1 balas
  • 1 memiliki masalah ini
  • 1 kunjungan
  • Balasan terakhir oleh 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?

Semua Balasan (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.