Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reset the search engine on the about:home page #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cornelisvl
Copy link

I have added the code to bootstrap.js as proposed in the SUMO contributors forum
https://support.mozilla.org/forums/contributors/708557#post-48144

I have added a try and catch with an alert just in case because they have changed getCodebasePrincipal to getNoAppCodebasePrincipal in Firefox 17

Notice that I had the wrong order for the alert parameters.
Took the opportunity to do some testing with prefs locked via mozilla.cfg that prevented finishing properly.
Added some DEBUG code for testing.
I think that it is working now.

if (originalDefaultEngine) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to add this check - after having reset the defaultenginename pref, originalDefaultEngine is garanteed to be present and represent the the build's default engine, unless its default value is corrupt due to e.g. an addon, but I don't think we should try to handle that case.

New proposal that addresses most changes.
Kept "if (originalDefaultEngine) {}" and moved the about:home code under it.
Improved the DEBUG info under resetPref().
browser.startup.homepage and browser.search.defaultenginename are complex values and thus are reset to chrome://browser-region/locale/region.properties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants