阅读:2653回复:9
Firefox的搜索框能不能在切换搜索引擎的时候默认自动搜索
我用的是3.0.11,右上角那个搜索引擎能否在里面有内容的情况下,切换了搜索引擎以后自动就搜索,不需要再点一次右边的搜索键才搜索??
|
|
1楼#
发布于:2009-07-08 10:11
/* userChrome.JS 脚本,转换搜索引擎后马上搜索 */
(function() { var searchbar = document.getElementById("searchbar"); eval("searchbar.select = " + searchbar.select.toString().replace(/}$/, "if (this.getAttribute('empty') != true && this.textbox.value.length)\ this.textbox.onTextEntered();\ }") ); })(); |
|
2楼#
发布于:2009-07-08 10:11
楼上的是userChromeJS的脚本吧?
|
|
|
3楼#
发布于:2009-07-08 10:11
GOLF-AT:/* userChrome 脚本,转换搜索引擎后马上搜索 */(function() { var searchbar = document.getElementById("searchbar"); eval("searchbar.select = " + searchbar.select.toString().replace(/}$/, "if (this.getAttribute('empty') != true && this.textbox.value.length)\ this.textbox.onTextEntered();\ }") ); })();回到原帖 是把这段加入userChrome文件吗? |
|
4楼#
发布于:2009-07-08 10:11
这是userChrome.js扩展脚本
|
|
|
5楼#
发布于:2009-07-08 10:11
|
|
6楼#
发布于:2009-07-08 10:11
这代码我试了,结果Ctrl+E和Ctrl+K的时候,也会自动搜索一次……
|
|
|
7楼#
发布于:2009-07-08 10:11
哦,除了这还有别的办法吗? |
|
8楼#
发布于:2009-07-08 10:11
|
|
|
9楼#
发布于:2009-07-08 10:11
kmc:@Chino 脚本没用习惯,也不太会用,还是扩展熟悉些,呵呵~ |
|