将自定义搜索引擎添加到Firefox [英] Adding A Custom Search Engine To Firefox

查看:165
本文介绍了将自定义搜索引擎添加到Firefox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要添加一个自定义搜索引擎到Firefox。我有一个名字和一个搜索网址。
$ b $ 1
$ $ c $%APPDATA%\Mozilla\\ \\ Firefox \Profiles\XXXXXXXX.default\prefs.js文件?


$ b $ 2我需要创建一个独特的XML文件夹中的新搜索引擎:

 %APPDATA%\Mozilla\Firefox\Profiles\ XXXXXXXX.default\searchplugins



 %PROGRAM_FILES%\Mozilla Firefox\searchplugins? 

3)我应该修改
%APPDATA%\ Mozilla \ FireFox \Profiles\XXXXXXXX.default\search.sqlite sqlite数据库文件?



在此先感谢!下面是步骤:
1)需要创建一个xml文件,其中将包含搜索引擎的信息,如ShortName,说明,网址等
xml文件示例:
https://developer.mozilla .org / en / Creating_MozSearch_plugins


$ b 2)给这个xml文件命名并放在这里:

 %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins

或者这里:

 %PROGRAM_FILES%\Mozilla Firefox \\ searchplugins

3)修改firefox偏好设置文件:

 %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js


只需添加/修改这一行:

  user_pref(browser.search.selectedEngine,engine_name); 

无需手动修改sqlite数据库文件。
重新启动Firefox之后,新的搜索引擎将被自动添加。

I need to add a custom search engine to firefox. I have a name and a search url.

1) What options should I change in "%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js" file?

2) Do I need to create a distinct xml file for new search engine in one of these folders:

"%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins"

or

"%PROGRAM_FILES%\Mozilla Firefox\searchplugins"?

3) Should I modify "%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\search.sqlite" sqlite database file?

Thanks in advance!

解决方案

Here are the steps: 1) Need to create an xml file which will contain information about search engine like ShortName, Description, Url etc. Example of xml file: https://developer.mozilla.org/en/Creating_MozSearch_plugins

2) Give a name to that xml file and put it here:

"%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins"

or here:

"%PROGRAM_FILES%\Mozilla Firefox\searchplugins"

3) Modifying firefox preferences file:

"%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js"

Simply add/modify this line:

user_pref("browser.search.selectedEngine", "engine_name");

No needing to modify sqlite database file manually. New search engine will be added automatically after restarting firefox.

这篇关于将自定义搜索引擎添加到Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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