Este site está com funcionalidades limitadas enquanto realizamos manutenção para melhorar sua experiência de uso. Se nenhum artigo resolver seu problema e você quiser fazer uma pergunta, nossa comunidade de suporte pode te ajudar em @FirefoxSupport no Twitter e /r/firefox no Reddit.

Pesquisar no site de suporte

Evite golpes de suporte. Nunca pedimos que você ligue ou envie uma mensagem de texto para um número de telefone, ou compartilhe informações pessoais. Denuncie atividades suspeitas usando a opção “Denunciar abuso”.

Saiba mais

Esta discussão foi arquivada. Faça uma nova pergunta se precisa de ajuda.

autoconfig use of profile-after-change

  • 1 resposta
  • 1 tem este problema
  • 1 visualização
  • Última resposta de 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?

Todas as respostas (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.