开发者

Install Search Engine plugin to FireFox from Extension

I am developing a Firefox extension. I would like to install new search plugin to the firefox search bar. I tried 2 ways, but none of them seems to work 100%.

  1. AddSearchEngineProvider works, but it displays "fail to install message" if the the search engine with the same name already exist. I dont see any API that enables me to query existing search engines.
  2. In Mozilla Firefox开发者_StackOverflow社区\searchplugins I see xml files that represent the actual search plugins. I was able to add my search engine manually, but I dont really know how to add the xml file during the installation. I have XPI file, which has very limited abilities to access IO.

Any suggestions? Thanks.


Search engines should be put into the searchplugins/ directory of your extension. They will be added automatically when your extension is installed - and removed again when it is uninstalled. See https://developer.mozilla.org/en/Bundles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜