在我的Firefox扩展中包含一个搜索插件 [英] Including a Search Plugin in my Firefox Extension

查看:132
本文介绍了在我的Firefox扩展中包含一个搜索插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我正在开发一个Firefox扩展(Firefox 3.6及以上版本)将我自己的搜索引擎添加到Firefox的可用搜索引擎列表中。

  2. 将默认搜索引擎更改为新安装的搜索引擎。

    奇怪的是,我在Mozilla开发者网络和Googeling上找不到多少帮助...

    谢谢。
    Aviv

    解决方案

    只要将您的搜索插件定义放在您的扩展程序的searchplugins /子目录中(请参阅 https://developer.mozilla.org/en/Bundles )。将browser.search.selectedEngine设置为您的引擎的名称,使其成为默认值。


    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

    解决方案

    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.

    这篇关于在我的Firefox扩展中包含一个搜索插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆