Firefox火狐如何添加网站的搜索引擎

  测试环境:win7,Firefox40。


第一:网站自带搜索引擎的


Firefox火狐如何添加网站的搜索引擎_第1张图片
bilibili

比如bilibili,火狐搜索框放大镜会出现一个加号,点击放大镜再点击下面的添加就可以成功添加b站作为搜索引擎了。

原理的话就是网站源码第十五行

search"type="application/opensearchdescription+xml"href="http://static.hdslb.com/opensearch.xml"title="哔哩哔哩"/>


再比如一些虽然搜索栏没有提示,不过网页有提示添加的。


Firefox火狐如何添加网站的搜索引擎_第2张图片
googto

有些藏在网站的帮助里面,不过自己注意一点也是很容易发现的。

如果每个网站都自带搜索引擎那应该会方便很多,可惜这是不现实的,大部分网站都是没有自带搜索引擎的,所以我们还需要其他手段。


第二:网站没有自带搜索引擎的

有些网站没有自带搜索引擎,好在使用人数众多,所以会有人写好网站的搜索引擎然后放在网上。

http://mycroftproject.com/

https://addons.mozilla.org/zh-CN/firefox/search-tools/

你只需要搜索一下,然后点击添加。


不过小众的网站就搜索不到了,比如http://www.aolsearch.com/

这时我们可以用扩展解决 https://addons.mozilla.org/zh-CN/firefox/addon/add-to-search-bar/(https://firefox.maltekraus.de/extensions/add-to-search-bar 不用重启)

扩展的使用方法很简单,在安装之后在网站的搜索框右键,新增至搜索列(这是繁体中文)

Firefox火狐如何添加网站的搜索引擎_第3张图片
aolsearch

搜索引擎名称可以自定义,图标可以点击浏览来自定义。

关键字有什么用可以参考:

如何在地址栏中用百度、Google、维基百科等搜索引擎搜索 | Firefox 帮助  https://support.mozilla.org/zh-CN/kb/%E6%99%BA%E8%83%BD%E5%85%B3%E9%94%AE%E5%AD%97                                                                                        http://kb.mozillazine.org/Using_keyword_searches


但是这样还不够,某些网站的搜索框add to search bar右键没有出现菜单,比如网易云音乐http://music.163.com/ ,不要慌,我们可以用个稍微有些复杂的扩展来添加。

Search Engine Creator  https://addons.mozilla.org/zh-CN/firefox/addon/search-engine-creator/ (需要重启)

安装之后重启火狐,打开about:addons,找到Search Engine Creator
,点击选项。


Firefox火狐如何添加网站的搜索引擎_第4张图片
选项


Firefox火狐如何添加网站的搜索引擎_第5张图片
简单的汉化版

我一项一项来说

Engine name:搜索引擎的名字,写个自己记得住的名字就行,比如网易云音乐。

Search URL:搜索链接,最重要的项目。要找到也很简单,比如网易云音乐搜索echo,搜索页面的链接就是

http://music.163.com/#/search/m/?s=echo&type=1

Search URL就填写

http://music.163.com/#/search/m/?s={searchTerms}&type=1

这个{searchTerms}就代表你要搜索的字词,这2个必填项目填完之后点击Create engine就成功添加了一个搜索引擎。要求不高的接下来关于这个扩展的内容看不看都无所谓了。

有些网站的搜索页面链接可能会很长,如果你看不习惯,精简一些也是可以的,比如百度主页搜索echo的搜索链接

https://www.baidu.com/s?wd=echo&rsv_spt=1&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&inputT=4517

Search URL写成

https://www.baidu.com/s?wd={searchTerms}&rsv_spt=1&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&inputT=4517

也可以正常搜索,精简一些也是可以的,搜索引擎后面的尾巴格式一般是

&字母=字母或者数字

搜索引擎就靠这个来判断你的搜索来自哪里等等。

删掉&后面所有的尾巴(包括&),只保留主体https://www.baidu.com/s?wd=echo看看还能不能正常搜索echo,不行就把删除的加上去,直到正常为止。

最后百度的Search URL就精简成了https://www.baidu.com/s?wd={searchTerms}。

Icon URL:图标链接,搜索引擎的图标链接,火狐新版的搜索框没有了这个真的很难判断这个搜索引擎到底是哪个。

一般打开 搜索引擎网址/favicon.ico(比如http://www.google.cn/favicon.ico),如果可以正常打开并且显示一个favicon,就代表这个链接可用,填入Icon URL,点击Create engine。

如果打开没有内容或者其他情况,比如 http://music.163.com/favicon.ico也不用担心,

我们可以用第三方服务来查看favicon,

http://favicon.yandex.net/favicon/music.163.com

https://www.google.com/s2/favicons?domain=music.163.com(被墙)

https://icons.duckduckgo.com/ip2/music.163.com.ico(被墙)

图标链接直接填入http://favicon.yandex.net/favicon/域名 就可以了。

在极端情况下这两种办法都没有获取到favicon,我们可以安装https://addons.mozilla.org/zh-CN/firefox/addon/stylish?src=api ,点击图标,编写新样式,空白样式

复制粘贴以下内容

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);

@-moz-document url(chrome://browser/content/browser.xul)

{.urlbar-textbox-container {-moz-binding: url("data:text/xml;charset=UTF-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+Cgo8YmluZGluZ3MgeG1sbnM9Imh0dHA6Ly93d3cubW96aWxsYS5vcmcveGJsIgogICAgICAgICAgeG1sbnM6eGJsPSJodHRwOi8vd3d3Lm1vemlsbGEub3JnL3hibCIKICAgICAgICAgIHhtbG5zOnh1bD0iaHR0cDovL3d3dy5tb3ppbGxhLm9yZy9rZXltYXN0ZXIvZ2F0ZWtlZXBlci90aGVyZS5pcy5vbmx5Lnh1bCI+CiAgICA8YmluZGluZyBpZD0icGFnZS1wcm94eS1wbHVnIj4KICAgICAgICA8Y29udGVudCBjb250ZXh0PSJfY2hpbGQiPgogICAgICAgICAgICA8eHVsOm1lbnVwb3B1cD4KICAgICAgICAgICAgICAgIDx4dWw6bWVudWl0ZW0gbGFiZWw9Iua4heepuuWcsOWdgOagjyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygnY2xlYXJfdXJsJyk7IiAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51aXRlbSBsYWJlbD0i6L+Y5Y6f5Zyw5Z2A5qCP5Zyw5Z2AIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbm1vdXNlZG93bj0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY2xpY2s9ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNvbW1hbmQ9InRoaXMucGFyZW50Tm9kZS5wYXJlbnROb2RlLmRvKCdyZXZlcnRfdXJsJyk7IiAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51c2VwYXJhdG9yIC8+CiAgICAgICAgICAgICAgICA8eHVsOm1lbnVpdGVtIGxhYmVsPSLlpI3liLblvZPliY3moIfnrb7lnLDlnYAiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ubW91c2Vkb3duPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jbGljaz0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY29tbWFuZD0idGhpcy5wYXJlbnROb2RlLnBhcmVudE5vZGUuZG8oJ2NvcHlfdXJsJyk7IiAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51aXRlbSBsYWJlbD0i5aSN5Yi25b2T5YmN5qCH562+5qCH6aKYK+WcsOWdgCIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygnY29weV90aXRsZSt1cmwnKTsiIC8+CiAgICAgICAgICAgICAgICA8eHVsOm1lbnVpdGVtIGxhYmVsPSLlpI3liLblvZPliY3moIfnrb7moIfpopgr5Zyw5Z2A77yI566A55+t77yJIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbm1vdXNlZG93bj0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY2xpY2s9ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNvbW1hbmQ9InRoaXMucGFyZW50Tm9kZS5wYXJlbnROb2RlLmRvKCdjb3B5X3RpdGxlK3VybF9jbGVhbicpOyIgLz4KICAgICAgICAgICAgICAgIDx4dWw6bWVudXNlcGFyYXRvciAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51aXRlbSBsYWJlbD0i57KY6LS05bm25Zyo5b2T5YmN5qCH562+5omT5byAIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbm1vdXNlZG93bj0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY2xpY2s9ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNvbW1hbmQ9InRoaXMucGFyZW50Tm9kZS5wYXJlbnROb2RlLmRvKCdwYXN0ZWFuZGdvX3VybF9jdXJyZW50Jyk7IiAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51aXRlbSBsYWJlbD0i57KY6LS05bm25Zyo5paw5qCH562+5omT5byA77yI5YmN5Y+w77yJIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbm1vdXNlZG93bj0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY2xpY2s9ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNvbW1hbmQ9InRoaXMucGFyZW50Tm9kZS5wYXJlbnROb2RlLmRvKCdwYXN0ZWFuZGdvX3VybF90YWJfZm9yZWdyb3VuZCcpOyIgLz4KICAgICAgICAgICAgICAgIDx4dWw6bWVudWl0ZW0gbGFiZWw9IueymOi0tOW5tuWcqOaWsOagh+etvuaJk+W8gO+8iOWQjuWPsO+8iSIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygncGFzdGVhbmRnb191cmxfdGFiX2JhY2tncm91bmQnKTsiIC8+CiAgICAgICAgICAgICAgICA8eHVsOm1lbnVzZXBhcmF0b3IgLz4KICAgICAgICAgICAgICAgIDx4dWw6bWVudWl0ZW0gbGFiZWw9IuWQkeS4iuS4gOWxgiIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygnZ29fdXBwZXJfbGV2ZWwnKTsiIC8+CiAgICAgICAgICAgICAgICA8eHVsOm1lbnVpdGVtIGxhYmVsPSLlkJHkuIrliLDmoLnln5/lkI0iCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ubW91c2Vkb3duPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jbGljaz0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY29tbWFuZD0idGhpcy5wYXJlbnROb2RlLnBhcmVudE5vZGUuZG8oJ2dvX3VwcGVyX3Jvb3QnKTsiIC8+CiAgICAgICAgICAgICAgICA8eHVsOm1lbnVzZXBhcmF0b3IgLz4KICAgICAgICAgICAgICAgIDx4dWw6bWVudWl0ZW0gbGFiZWw9IuWPr+ingeWMuuWfn+aIquWbviIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygnc2NyZWVuX3Nob3QnKTsiIC8+CiAgICAgICAgICAgICAgICA8eHVsOm1lbnVpdGVtIGxhYmVsPSLmlbTkuKrnvZHpobXmiKrlm74iCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ubW91c2Vkb3duPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jbGljaz0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY29tbWFuZD0idGhpcy5wYXJlbnROb2RlLnBhcmVudE5vZGUuZG8oJ3NjcmVlbl9zaG90X3dlYicpOyIgLz4KICAgICAgICAgICAgICAgIDx4dWw6bWVudXNlcGFyYXRvciAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51aXRlbSBsYWJlbD0i5aSN5Yi256uZ54K55Zu+5qCH5Zyw5Z2AIgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbm1vdXNlZG93bj0iZXZlbnQucHJldmVudERlZmF1bHQoKTtldmVudC5zdG9wUHJvcGFnYXRpb24oKTsiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uY2xpY2s9ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNvbW1hbmQ9InRoaXMucGFyZW50Tm9kZS5wYXJlbnROb2RlLmRvKCdjb3B5X2Zhdmljb25fdXJsJyk7IiAvPgogICAgICAgICAgICAgICAgPHh1bDptZW51aXRlbSBsYWJlbD0i5aSN5Yi256uZ54K55Zu+5qCH77yIYmFzZTY0IOe8luegge+8iSIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygnY29weV9mYXZpY29uX2Jhc2U2NCcpOyIgLz4KICAgICAgICAgICAgICAgIDx4dWw6bWVudWl0ZW0gbGFiZWw9IuS/neWtmOermeeCueWbvuaghyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25tb3VzZWRvd249ImV2ZW50LnByZXZlbnREZWZhdWx0KCk7ZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7IgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmNsaWNrPSJldmVudC5wcmV2ZW50RGVmYXVsdCgpO2V2ZW50LnN0b3BQcm9wYWdhdGlvbigpOyIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25jb21tYW5kPSJ0aGlzLnBhcmVudE5vZGUucGFyZW50Tm9kZS5kbygnc2F2ZV9mYXZpY29uJyk7IiAvPgogICAgICAgICAgICA8L3h1bDptZW51cG9wdXA+CiAgICAgICAgICAgIDxjaGlsZHJlbiAvPgogICAgICAgIDwvY29udGVudD4KICAgICAgICA8aW1wbGVtZW50YXRpb24+CiAgICAgICAgICAgIDxtZXRob2QgbmFtZT0iZG8iPgogICAgICAgICAgICAgICAgPHBhcmFtZXRlciBuYW1lPSJjb21tYW5kIiAvPgogICAgICAgICAgICAgICAgPGJvZHk+CiAgICAgICAgICAgICAgICAgICAgPCFbQ0RBVEFbCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoY29tbWFuZCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY2xlYXJfdXJsJyA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdVUkxCYXIudmFsdWUgPSAiIikgfHwgZ1VSTEJhci5mb2N1cygpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncmV2ZXJ0X3VybCcgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChnVVJMQmFyLnZhbHVlID0gZ0Jyb3dzZXIuY3VycmVudFVSSS5zcGVjKSB8fCBnVVJMQmFyLmZvY3VzKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjb3B5X3VybCcgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMud3JpdGVUb0NsaXBib2FyZChnQnJvd3Nlci5jdXJyZW50VVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29weV90aXRsZSt1cmwnIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLndyaXRlVG9DbGlwYm9hcmQoY29udGVudC5kb2N1bWVudC50aXRsZSArICJcbiIgKyBnQnJvd3Nlci5jdXJyZW50VVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29weV90aXRsZSt1cmxfY2xlYW4nIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLndyaXRlVG9DbGlwYm9hcmQoY29udGVudC5kb2N1bWVudC50aXRsZS5yZXBsYWNlKC9ccy1ccy4qL2ksIiIpLnJlcGxhY2UoL19bXlxbXF3jgJDjgJFdKyQvLCIiKSArICJcbiIgKyBnQnJvd3Nlci5jdXJyZW50VVJJLnNwZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncGFzdGVhbmRnb191cmxfY3VycmVudCcgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZW5VSUxpbmtJbihyZWFkRnJvbUNsaXBib2FyZCgpLCAiY3VycmVudCIsIHRydWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncGFzdGVhbmRnb191cmxfdGFiX2ZvcmVncm91bmQnIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVuVUlMaW5rSW4ocmVhZEZyb21DbGlwYm9hcmQoKSwgInRhYiIsIHRydWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncGFzdGVhbmRnb191cmxfdGFiX2JhY2tncm91bmQnIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnQnJvd3Nlci5sb2FkT25lVGFiKHJlYWRGcm9tQ2xpcGJvYXJkKCksIG51bGwsIG51bGwsIG51bGwsIHRydWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZ29fdXBwZXJfbGV2ZWwnIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmdvVXBwZXJMZXZlbCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZ29fdXBwZXJfcm9vdCcgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuZ29VcHBlclJvb3QoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3NjcmVlbl9zaG90JyA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5TY3JlZW5TaG90KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdzY3JlZW5fc2hvdF93ZWInIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLldlYlNjcmVlblNob3QoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2NvcHlfZmF2aWNvbl91cmwnIDoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLndyaXRlVG9DbGlwYm9hcmQoZ0Jyb3dzZXIubUN1cnJlbnRUYWIuaW1hZ2UpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnY29weV9mYXZpY29uX2Jhc2U2NCcgOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudG9CYXNlNjQoZ0Jyb3dzZXIubUN1cnJlbnRUYWIuaW1hZ2UpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnc2F2ZV9mYXZpY29uJyA6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZVVSTChnQnJvd3Nlci5tQ3VycmVudFRhYi5pbWFnZSwgbnVsbCwgbnVsbCwgZmFsc2UsIG51bGwsIG51bGwsIGRvY3VtZW50KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIF1dPgogICAgICAgICAgICAgICAgPC9ib2R5PgogICAgICAgICAgICA8L21ldGhvZD4KICAgICAgICAgICAgPG1ldGhvZCBuYW1lPSJnb1VwcGVyTGV2ZWwiPgogICAgICAgICAgICAgICAgPHBhcmFtZXRlciBuYW1lPSJzdHJpbmciIC8+CiAgICAgICAgICAgICAgICA8Ym9keT4KICAgICAgICAgICAgICAgICAgICA8IVtDREFUQVsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVyaSA9IGdCcm93c2VyLmN1cnJlbnRVUkk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmkucGF0aCA9PSAiLyIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGF0aExpc3QgPSB1cmkucGF0aC5zcGxpdCgiLyIpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXBhdGhMaXN0LnBvcCgpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhMaXN0LnBvcCgpOwogICAgICAgICAgICAgICAgICAgICAgICBsb2FkVVJJKHVyaS5wcmVQYXRoICsgcGF0aExpc3Quam9pbigiLyIpICsgIi8iKTsKICAgICAgICAgICAgICAgICAgICBdXT4KICAgICAgICAgICAgICAgIDwvYm9keT4KICAgICAgICAgICAgPC9tZXRob2Q+CiAgICAgICAgICAgIDxtZXRob2QgbmFtZT0iZ29VcHBlclJvb3QiPgogICAgICAgICAgICAgICAgPHBhcmFtZXRlciBuYW1lPSJzdHJpbmciIC8+CiAgICAgICAgICAgICAgICA8Ym9keT4KICAgICAgICAgICAgICAgICAgICA8IVtDREFUQVsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVyaSA9IGdCcm93c2VyLmN1cnJlbnRVUkk7CiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRVUkkodXJpLnByZVBhdGggKyAiLyIpOwogICAgICAgICAgICAgICAgICAgIF1dPgogICAgICAgICAgICAgICAgPC9ib2R5PgogICAgICAgICAgICA8L21ldGhvZD4KICAgICAgICAgICAgPG1ldGhvZCBuYW1lPSJ3cml0ZVRvQ2xpcGJvYXJkIj4KICAgICAgICAgICAgICAgIDxwYXJhbWV0ZXIgbmFtZT0ic3RyaW5nIiAvPgogICAgICAgICAgICAgICAgPGJvZHk+CiAgICAgICAgICAgICAgICAgICAgPCFbQ0RBVEFbCiAgICAgICAgICAgICAgICAgICAgICAgIENvbXBvbmVudHMuY2xhc3Nlc1siQG1vemlsbGEub3JnL3dpZGdldC9jbGlwYm9hcmRoZWxwZXI7MSJdCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZ2V0U2VydmljZShDb21wb25lbnRzLmludGVyZmFjZXMubnNJQ2xpcGJvYXJkSGVscGVyKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmNvcHlTdHJpbmcoc3RyaW5nKTsKICAgICAgICAgICAgICAgICAgICBdXT4KICAgICAgICAgICAgICAgIDwvYm9keT4KICAgICAgICAgICAgPC9tZXRob2Q+CiAgICAgICAgICAgIDxtZXRob2QgbmFtZT0idG9CYXNlNjQiPgogICAgICAgICAgICAgICAgPHBhcmFtZXRlciBuYW1lPSJpY29uIiAvPgogICAgICAgICAgICAgICAgPGJvZHk+CiAgICAgICAgICAgICAgICAgICAgPCFbQ0RBVEFbCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IE5TVVJJID0gImh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgaW1nID0gbmV3IEltYWdlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aGF0ID0gdGhpczsKICAgICAgICAgICAgICAgICAgICAgICAgaW1nLm9ubG9hZCA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB3aWR0aCA9IHRoaXMubmF0dXJhbFdpZHRoLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodCA9IHRoaXMubmF0dXJhbEhlaWdodDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjYW52YXMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoTlNVUkksICJjYW52YXMiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbnZhcy53aWR0aCA9IHdpZHRoOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FudmFzLmhlaWdodCA9IGhlaWdodDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjdHggPSBjYW52YXMuZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UodGhpcywgMCwgMCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGF0LndyaXRlVG9DbGlwYm9hcmQoY2FudmFzLnRvRGF0YVVSTCgiaW1hZ2UvcG5nIikpOwogICAgICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgICAgICBpbWcub25lcnJvciA9IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbXBvbmVudHMudXRpbHMucmVwb3J0RXJyb3IoIkNvdW50IG5vdCBsb2FkOiAiICsgaWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgICAgIGltZy5zcmMgPSBpY29uOwogICAgICAgICAgICAgICAgICAgIF1dPgogICAgICAgICAgICAgICAgPC9ib2R5PgogICAgICAgICAgICA8L21ldGhvZD4KICAgICAgICAgICAgPG1ldGhvZCBuYW1lPSJTY3JlZW5TaG90Ij4KICAgICAgICAgICAgICAgIDxwYXJhbWV0ZXIgbmFtZT0ic3RyaW5nIiAvPgogICAgICAgICAgICAgICAgPGJvZHk+CiAgICAgICAgICAgICAgICAgICAgPCFbQ0RBVEFbCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjYW52YXMgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoImh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiLCAiY2FudmFzIik7CiAgICAgICAgICAgICAgICAgICAgICAgIGNhbnZhcy53aWR0aCA9IGNvbnRlbnQuaW5uZXJXaWR0aDsKICAgICAgICAgICAgICAgICAgICAgICAgY2FudmFzLmhlaWdodCA9IGNvbnRlbnQuaW5uZXJIZWlnaHQ7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjdHggPSBjYW52YXMuZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgICAgICAgICAgICAgICAgICAgY3R4LmRyYXdXaW5kb3coY29udGVudCwgY29udGVudC5wYWdlWE9mZnNldCwgY29udGVudC5wYWdlWU9mZnNldCwgY2FudmFzLndpZHRoLCBjYW52YXMuaGVpZ2h0LCAicmdiKDI1NSwyNTUsMjU1KSIpOwogICAgICAgICAgICAgICAgICAgICAgICBzYXZlSW1hZ2VVUkwoY2FudmFzLnRvRGF0YVVSTCgpLCBjb250ZW50LmRvY3VtZW50LnRpdGxlICsgIi5wbmciLG51bGwsZmFsc2UsbnVsbCxudWxsLGRvY3VtZW50KTsKICAgICAgICAgICAgICAgICAgICBdXT4KICAgICAgICAgICAgICAgIDwvYm9keT4KICAgICAgICAgICAgPC9tZXRob2Q+CiAgICAgICAgICAgIDxtZXRob2QgbmFtZT0iV2ViU2NyZWVuU2hvdCI+CiAgICAgICAgICAgICAgICA8cGFyYW1ldGVyIG5hbWU9InN0cmluZyIgLz4KICAgICAgICAgICAgICAgIDxib2R5PgogICAgICAgICAgICAgICAgICAgIDwhW0NEQVRBWwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2FudmFzID1kb2N1bWVudC5jcmVhdGVFbGVtZW50TlMoJ2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwnLCAnaHRtbDpjYW52YXMnKTsKICAgICAgICAgICAgICAgICAgICAgICAgY2FudmFzLndpZHRoID0gY29udGVudC5kb2N1bWVudC5ib2R5LmNsaWVudFdpZHRoOwogICAgICAgICAgICAgICAgICAgICAgICBjYW52YXMuaGVpZ2h0ID0gY29udGVudC5kb2N1bWVudC5ib2R5LmNsaWVudEhlaWdodDsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN0eCA9IGNhbnZhcy5nZXRDb250ZXh0KCIyZCIpOwogICAgICAgICAgICAgICAgICAgICAgICBjdHguZHJhd1dpbmRvdyhjb250ZW50LCAwLCAwLCBjYW52YXMud2lkdGgsIGNhbnZhcy5oZWlnaHQsICJyZ2IoMjU1LDI1NSwyNTUpIik7CiAgICAgICAgICAgICAgICAgICAgICAgIHNhdmVJbWFnZVVSTChjYW52YXMudG9EYXRhVVJMKCksIGNvbnRlbnQuZG9jdW1lbnQudGl0bGUgKyAiLnBuZyIsbnVsbCxmYWxzZSxudWxsLG51bGwsZG9jdW1lbnQpOwogICAgICAgICAgICAgICAgICAgIF1dPgogICAgICAgICAgICAgICAgPC9ib2R5PgogICAgICAgICAgICA8L21ldGhvZD4KICAgICAgICA8L2ltcGxlbWVudGF0aW9uPgogICAgPC9iaW5kaW5nPgo8L2JpbmRpbmdzPgo=");}

或者 http://notepad.cc/share/mz97FjFL9f https://pastebin.mozilla.org/8850974
随便取个名字,保存样式。

如图所示添加样式,记得起名保存


Firefox火狐如何添加网站的搜索引擎_第6张图片
右键地址栏地球图标

右键地址栏地球图标就会有这些选项,点击复制站点图标地址就行了。

关键字之前说过了。

描述随便写个记得住的,就是你把鼠标移动到搜索引擎上出现的字。


手机好搜就是描述

最后点击创建搜索引擎就可以了,截至目前一个搜索引擎就被创建并且可以使用了。


由于扩展本身的问题,创建的搜索引擎不能搜索非拉丁字符,就是说搜索中文会乱码,所以你还需要做一件事情,火狐打开about:support,点击“配置文件夹”右边的显示文件夹,找到searchplugins文件夹并打开,把里面的文件按修改时间排序排序,找到刚刚创建的搜索引擎xml文件,用记事本打开,找到


Firefox火狐如何添加网站的搜索引擎_第7张图片

有InputEncoding的那一行,把windows-1252修改为UTF-8,保存,同时删除配置目录下的search.json和search-metadata.json文件,重启火狐,现在搜索引擎可以正常使用了,可喜可贺。
所以这个扩展这点还是挺麻烦了,等以后更新了UTF-8相关就会方便一点了。


讲完了用扩展创建搜索引擎xml文件的方法,最后说一下直接新建一个搜索引擎xml文件的办法,也是最保险的办法。

还是之前提到的火狐打开about:support,点击“配置文件夹”右边的显示文件夹,找到searchplugins文件夹并打开,右键新建文本文档.txt,重命名为 搜索引擎名称.xml。

下面的内容请查看Firefox如何为网站手动创建一个搜索引擎xml文件 


你可能感兴趣的:(Firefox火狐如何添加网站的搜索引擎)