Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Learn More

How to create config preference via user.js file without manually editing through about:config portal?

  • 1 отговор
  • 1 има този проблем
  • 36 изгледи
  • Последен отговор от CJ36

more options

I'm interested in creating a new configuration preference for my user-agent (general.useragent.override). I know how to manually create one via about:config; however, it is overwritten by my user.js file every launch.

Is there a way to create an entry in the user.js file for a preference that does not exist?

General syntax: user_pref("general.useragent.override",Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0);

But obviously, this causes an error since that preference does not exist.

Thanks for the help!

I'm interested in creating a new configuration preference for my user-agent (general.useragent.override). I know how to manually create one via about:config; however, it is overwritten by my user.js file every launch. Is there a way to create an entry in the user.js file for a preference that does not exist? General syntax: user_pref("general.useragent.override",Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0); But obviously, this causes an error since that preference does not exist. Thanks for the help!

Избрано решение

NVM...

To answer my questions...YES you can create a new config preference via the user.js file. Just don't be special like myself and use incorrect syntax.

The correct syntax: user_pref("general.useragent.override","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0");

Прочетете този отговор в контекста 👍 0

Всички отговори (1)

more options

Избрано решение

NVM...

To answer my questions...YES you can create a new config preference via the user.js file. Just don't be special like myself and use incorrect syntax.

The correct syntax: user_pref("general.useragent.override","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0");