I'm trying to set default search engine using user.js, but I have troubles finding way to do it. What firefox option in about:config manages this thing?
2 Answers
This used to be settable via browser.search.defaultenginename. As of Firefox 34 and later, this is no longer possible. (Well, you can change the setting but nothing will happen.) This bug report has the details:
store "current search engine" configuration outside of prefs
[ . . . ]
A common way to hijack searches is to override the browser.search.selecedEngine pref (e.g. by writing to the user's pref file, or dropping in a user.js file in the profile, or shipping an addon with a different value for that pref).
Since this is a high-value configuration option, it makes more sense to store this information outside of prefs (which are designed to be modular and overridden).
[ . . . ]
Proposed changes:
- completely stop using browser.search.selectedEngine (except for a one time migration),
- ignore user values of browser.search.defaultenginename (we still need to respect the default value, because that's the way the default search engine is customized for different locales, or for ESR users).
[ . . . ]
This will break extensions who set the selectedEngine from their code instead of setting it through the service. If we're fine with that (assuming I'm correct), why don't we also remove the defaultenginename pref observer too to simplify the code?
[ . . . ]
I removed the defaultenginename pref observer
[ . . . ]
What firefox option in about:config manages this thing?
Name Type Meaning of Values
browser.search.defaultenginename String Default search engine plugin to use. Default value is Google.
-
1