Posted on 2007-11-01 22:13
qiyadeng 阅读(1044)
评论(1) 编辑 收藏
在Google的工具条中制作Baidu的搜索按钮
安装了Google工具条是很方便的,但是有的时候需要使用Baidu搜索一些中文方面的资料的时候(我认为百度在搜索中文方面比Google强,而且我还是爱国青年^_^),这样还得到百度网站,把工具条的内容复制下来,这样就显得很麻烦。就想在Google按钮的旁边加个百度的按钮,这样就可以方便的进行搜索了。
其实Google工具条可以方便的实现自定义按钮的,详细的可以看API使用入门(http://toolbar.google.com/buttons/intl/zh-CN/apis/howto_guide.html)。
给出我的Baidu按钮实现方法:
1.在“C:\Documents and Settings\qiya\Local Settings\Application Data\Google\Custom Buttons”(这个是隐藏文件)路径下面的文件夹下面创建一个XML文件,如www.baidu.com_qiyadeng.xml。
把下面的内容复制进去:
<?xml version="1.0" encoding="utf-8"?>
<custombuttons xmlns="http://toolbar.google.com/custombuttons/">
<button>
<search>http://www.baidu.com/s?ie=utf-8&wd={query}</search>
<site>http://www.baidu.com</site>
<title>Baidu</title>
<description>Baidu</description>
<icon>
R0lGODlhpwB3ANUAAPSpsvGJk5Om8dsAJ+xqcBE01fzn6uU4Of/1E+xUbf////jCxPUAMOhTVP2z
COETFe00VfObp/dhEd4ICFJt4+sAKyxN3PrT1sjR9/vepv3y8++ZDf/MZu+xYuEAJW+G6PEALu83
FuTp/PB2gPjIz+qoK/7VEbPA9PzszNsbOvH0/f735va3u+UAKNng+eOHDfvd4P7BN/739uzw/QEX
x/3s7uyRQPf5/uMhIPNuU+ELJ/MVQAAo0d0AAN4AJAAAACH5BAAAAAAALAAAAACnAHcAAAb/QIVw
SCwaj8ikcslsOp/QqHRKrVqv2Kx2y+16v+CweEwum8/otHrNbrvf8Lh8Tq/b7/i8PqkxwBYAESOD
IwERESQwBjUae0QaEY5TNX8BCRA7IJqbmwyeDDs7EAkBABeKMngJO42STAYkEQSYnJqft7i5oKOl
CxetcCOeCa5JsbM7t7a6zM2foRAjESwwbcKf1cVDF5bJn50gzuLjoDsJBAELZx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z6ARimnaeKSyVMmkrsxOB5YwKQqkeQvgI6r0LAAho5Aso5iihrWu1ae8Rp
w0tAjZF6xoUAAAsQKivQxokWWSKntodKdyVbjntrxjH4hipwAiPcoZPEco2GAYKMASvXjEJWSSd8
pXFctIxMtM9LArzIkdjoeaG4DSNQtFsqBvGWAdcGoNrwyVwgAxnQATGAAobAAlYJyqo8MyUwIZaQ
wascy1JwMSgDCLJ8y57zAmmJgsu8PMuu5AAr0MvC7ATx5QAZMMzIrAQooMsTkszObAQlUDPB/MzU
TDOjcszU/My4lTHTnM3JLANSg83enMzzxAHdPM7CvFlNIs7oLMwZYGztHM/yPM/0XM/2fM/4nM/6
vM/83M8KEAQAOw==
</icon>
</button>
</custombuttons>
这样重启开启浏览器,按钮就应该自动增加好了。这些是最基本的功能,不过对我来说已经足够了,需要增加的话可以具体查看API使用入门。
如果觉得按钮的图标不够漂亮的话,也可以更改<icon></icon>中的值。使用你自己的图片到http://www.motobit.com/util/base64-decoder-encoder.asp转换成Base64代码替换<icon></icon>中的值即可。