[h1]Customized your own Firefox 3/4 Search Bar Plug-In[/h1]
[h2]1. Locate Firefox Search Plug-In Folder[/h2]
Windows: C:\Program Files\Mozilla Firefox\searchplugins\
Linux: /usr/lib/firefox-4.X.X/searchplugins/
There are some default built-in XML in it,
you could duplicate and revise them to meet your need.
[h2]2. Build your OWN icon by base64 encode (Optional)[/h2]
Get your website's favoicon or your logo gif file,
then base64-encode it.
引言回覆: |
# ls favicon.ico
-rw-r--r-- 1 user user 318 2003-06-26 19:33 favicon.ico
#
# base64 favicon.ico
AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAA
AAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAANQA////AAAAwAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAEAIiAAAAAAEAEREREREREAEAEQEAAAAQAQAAAQAAABABAQ
ABAREAEAEBEAEBEQAQAQEQAQAAABABARABAAAAEAEBEAAREREAAQ
AQAAAAAAABABAAAREAAAEAAAEAEAAAAQAQARAAARABERERAAEREA
ARERERERAAEAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
Note: these base64 are __without__ CR/LF/Space.
[h2]3. Build Your OWN Search Page[/h2]
You could use Google Custom Search or Google AdSense Search
Google Custom Search: http://www.google.com/cse/
Google Adsense Search: https://www.google.com/adsense/report/overview
[h2]4. Build Your OWN XML by revise one of XML[/h2]
Revise the ShortName/Description/InputEncoding/Image/Url/SearchForm
to meet your needed.
e.g. Paste base64 encoded code into Image-XML-Field from step-2
NOTE: These filed (includes tag or value) __must__ be "Case-Sensitive".
代碼:
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>小哈搜尋</ShortName>
<Description>小哈搜尋</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/gif;...SKIP...</Image>
<Url type="text/html" method="GET" template="http://vovo2000.com/utils/search-result/">
<Param name="q" value="{searchTerms}"/>
<Param name="cx" value="partner-pub-8334843251678223:1729803172"/>
<Param name="cof" value="FORID:10"/>
<Param name="ie" value="utf-8"/>
<Param name="sa" value="搜尋"/>
</Url>
<SearchForm>http://vovo2000.com/utils/search-all/</SearchForm>
</SearchPlugin>
Note: AGAIN, the base64 Image-XML-tag are "contiguous" without CR/LF/Space.
[h2]5. Copy the XML file into the searchplugins folder mentioned above[/h2]
Edit it and save it into the folder.
[h2]6. Restart Firefox 4[/h2]
Then, you could see the your personal Firefox Plug-Ins!
Note: These steps may too work well under Firefox 3 / 3.5 / 3.6 / 4.0(2011-04-17 18:36)