Including a Search Plugin in my Firefox Extension
I am developing a Firefox Extension (Firefox 3.6 and up) and i would like, when the user installs my extension to:
- Add my own Search Engine to the list开发者_Python百科 of available Search Engines in Firefox.
- Change the default search engine to my new installed search engine.
How strange that it is, I couldn't find much help in the Mozilla Developer Network and Googeling it...
Thanks. Aviv
Just put your search plugin definition in the searchplugins/ subdirectory of your extension (see https://developer.mozilla.org/en/Bundles). Set browser.search.selectedEngine to the name of your engine to make it the default.
精彩评论