Skip to content

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

Open
cornelisvl wants to merge 3 commits intogavinsharp:masterfrom
cornelisvl:patch-1
Open

reset the search engine on the about:home page#2
cornelisvl wants to merge 3 commits intogavinsharp:masterfrom
cornelisvl:patch-1

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.
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