首先找一个既有的搜索引擎描述信息,这里用的是ASK.COM:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<!-- Created on Tue, 17 Jul 2007 21:17:31 GMT -->
<ShortName>Ask.com</ShortName>
<Description>Get more with each search.</Description>
<Url type="text/html" method="get" template="http://www.ask.com/web?q={searchTerms}&qsrc=145&o=ffx"/>
<Url type="application/x-suggestions+json" template="http://ss.ask.com/query?q={searchTerms}&li=ff"/>
<Image width="16" height="16">http://mycroft.mozdev.org/updateos.php/id0/ask16x16.ico</Image>
<Developer>Valerie Lanard</Developer>
<InputEncoding>UTF-8</InputEncoding>
<moz:SearchForm>http://www.ask.com</moz:SearchForm>
<moz:UpdateInterval>7</moz:UpdateInterval>
</OpenSearchDescription>
然后修改之,成为如下内容:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<!-- Created on Fri Oct 10 10:24:18 CST 2008 -->
<ShortName>Google缈昏瘧</ShortName>
<Description>Get more with each search.</Description>
<Url type="text/html" method="get" template="http://translate.google.com/translate_t#en|zh-CN|{searchTerms}"/>
<Developer>SEATLE</Developer>
<InputEncoding>UTF-8</InputEncoding>
<moz:SearchForm>http://translate.google.com</moz:SearchForm>
<moz:UpdateInterval>7</moz:UpdateInterval>
</OpenSearchDescription>
乱码部分是因为我用了UTF8编码。把它放到C:\Program Files\Mozilla Firefox\searchplugins目录下,重启Firefox就行了。
沒有留言:
發佈留言