Including a Search Plugin in my Firefox Extension

巧了我就是萌 提交于 2019-12-11 10:12:55

问题


I am developing a Firefox Extension (Firefox 3.6 and up) and i would like, when the user installs my extension to:

  1. Add my own Search Engine to the list of available Search Engines in Firefox.
  2. 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


回答1:


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.



来源:https://stackoverflow.com/questions/6678740/including-a-search-plugin-in-my-firefox-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!