I would like search engines to be able to test whether they are the user's default search engine. IE does a similar thing with home page (try it on Google). I think we should, despite the minor privacy hit, because it would encourage sites to give their users search plugins: 1. Google could include a link "Make Google your default search engine", and make the link disappear if the default search engine is already Google. It does something similar for Internet Explorer, but with the home page rather than the search engine. 2. After calling window.sidebar.addSearchEgnie(), Google could test again to see if the user accepted the plugin and made Google the default using the checkbox from bug 153188. Then Google could say "Congratulations! You can now go to the Google home page by selecting 'Tools, Search the Web' or by pressing Ctrl+Shift+F. You can also search Google using the Search panel in the Mozilla sidebar." The function might be window.sidebar.isDefaultSearchEngine("Google"). We could also have window.sidebar.haveSearchEngine("LXR @ mozilla.org") for sites that want to give users Sherlock plugins but don't expect to be the default search engine.
since buzilla doesn't allow me to cast a vote against a bug, I'll put it in my comment :p - no Web page shall be permitted to change any option present in the Perference - no Web page shall be permitted to read any option present in the Perference - no Web page shall be permitted to add any option to the Preference - no Web page shall be permitted to access the user's bookmarks - no Web page shall be permitted to access the user's history - no Web page shall be permitted to access the user's cache - no Web page shall be able to work around access restrictions via executables, such as Flash or Java applet. besides, if you allow a Web page to access the Preference, are you going to put another option in Preference to forbid such access? The feature requested will just cause more problems.
Strongly recommend wontfix. Power to the user, not to websites and all such... Agreeing with Daniel and wishing for negative votes... :)
Since Google can open a dialog allowing the user to add Google as a search engine (mod bug 153188), I think it is reasonable to allow Google to test whether they are the default. Remember, the purpose of this feature is to allow Google to make it easier for the user to make a choice. We could restrict the feature so that only Google can test whether Google is the default search engine. The syntax would change to window.sidebar.isDefaultSearchEngine("http://www.google.com/") or just window.sidebar.amIDefaultSearchEngine().
I'm still against this feature. I can't find any "add this to your sidebar" on google.com, but I'd guess that 1) user has to do something (clicking) and 2) there would be a message box or a dialog. However, when you say a search engine should be able to check if it's the default (or even if it's already installed), you probably mean checking siliently (without notifying the user). That's bad; browser setting and Preference should not be done without the user being aware of it. You could alert the user of the Web page's intention, but then that would be too much distraction.
> I can't find any "add this to your sidebar" on google.com, but I'd guess that 1) > user has to do something (clicking) and 2) there would be a message box or a > dialog. That's why I filed this bug. I think that if Mozilla fixes this bug and bug 153188, Google is likely to add a "Make Google Your Default Search Engine!" link at the bottom for Mozilla users like it adds "Make Google Your Homepage!" for IE users who don't have Google set as their home page.
MASS-CHANGE: This bug report is registered in the SeaMonkey product, but has been without a comment since the inception of the SeaMonkey project. This means that it was logged against the old Mozilla suite and we cannot determine that it's still valid for the current SeaMonkey suite. Because of this, we are setting it to an UNCONFIRMED state. If you can confirm that this report still applies to current SeaMonkey 2.x nightly builds, please set it back to the NEW state along with a comment on how you reproduced it on what Build ID, or if it's an enhancement request, why it's still worth implementing and in what way. If you can confirm that the report doesn't apply to current SeaMonkey 2.x nightly builds, please set it to the appropriate RESOLVED state (WORKSFORME, INVALID, WONTFIX, or similar). If no action happens within the next few months, we move this bug report to an EXPIRED state. Query tag for this change: mass-UNCONFIRM-20090614
Bug 340604 covers implementing IE's IsSearchProviderInstalled, which lets the site determine both whether its engine is installed and also whether it is the active search engine.