阅读:2038回复:5
如何修改_addmenu.js的站內搜索
小白一個
改成Bing的,自己改過,怎麼改就不行。 gBrowser.loadURI("javascript:var%20Bar=location.host+%22%22;q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22\\u8acb\u8f38\u5165\u641c\u5c0b\u7684\u95dc\u9375\u8a5e:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.baidu.com/s?&ie=UTF-8&oe=UTF-8&cl=3&rn=100&wd=%20%20'+q+'%20%20%20site:%20'+Bar+'');window.open(qlocation);}%20void%200") |
|
1楼#
发布于:2015-12-23 13:23
找到原因了,被火狐擋掉了。
為什麼谷歌的不會? |
|
2楼#
发布于:2015-12-22 15:32
一樣不能用。
這是我的,只有谷歌可以。 // 頁面信息右鍵選單 new function () { var items = [ { label: "站內搜", tooltiptext: "左鍵:谷歌\n中鍵:百度\n右鍵:必應", image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA70lEQVQ4jaWTMU7DUAyGcw3ugcqSsrL05ffaShUbQ97vA3AByIS4BWJE3CFzpaosnbO857fTVhUMgFSJpGrS4Ze8+LP9286MWCeVryEyYp0NTf5TF2BjRGNEk1Q2/QCUOqqbhtLloXR5VDdNlPo0AKU2nYyMeDTFyhSrn3gy6oJkB8nbSMxMUf0zS1FFYpYo206AEU1QjJPKsqXSMijGv54MAFAWoXT5UcDRESgP5mWeFLt+JlI+IvEU724ujPLcf42+uDZf3JqiMo8ro7yfc0ivkcWlEW+nANpFvJgv7g+vs+8v7E3xObyDNhPPfedv/QONfpdRxsQAAAAASUVORK5CYII=", onclick: function(e){ switch(e.button){ case 0: gBrowser.loadURI("javascript:var%20Bar=location.host+%22%22;q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22\u8acb\u8f38\u5165\u641c\u5c0b\u7684\u95dc\u9375\u8a5e:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.google.com/search?num=30&hl=zh-TW&newwindow=1&q='+q+'&sitesearch='+Bar+'');window.open(qlocation);}%20void%200") break; case 1: gBrowser.loadURI("javascript:var%20Bar=location.host+%22%22;q%20=%20%22%22%20+%20(window.getSelection%20?%20window.getSelection()%20:%20document.getSelection%20?%20document.getSelection()%20:%20document.selection.createRange().text);%20if%20(!q)%20q%20=%20prompt(%22\u8acb\u8f38\u5165\u641c\u5c0b\u7684\u95dc\u9375\u8a5e:%22,%20%22%22);%20if%20(q!=null)%20{var%20qlocation=%22%20%22;qlocation=('http://www.google.com/search?num=30&hl=zh-TW&newwindow=1&q='+q+'&sitesearch='+Bar+'');window.open(qlocation);}%20void%200") break; case 2: gBrowser.loadURI("javascript:(function(){ p=prompt('%E5%9C%A8 '+document.location.href.split('/')[2]+' %E4%B8%AD%E6%90%9C%E7%B4%A2',''); if(p){ document.open('http://cn.bing.com/search?q=site:'+document.location.href.split('/')[2]+' '+p,'','')} })();") break; } }, accesskey: "I" }, |
|
3楼#
发布于:2015-12-22 14:25
gBrowser.loadURI("javascript:(function(){ p=prompt('%E5%9C%A8 '+document.location.href.split('/')[2]+' %E4%B8%AD%E6%90%9C%E7%B4%A2',''); if(p){ document.open('http://cn.bing.com/search?q=site:'+document.location.href.split('/')[2]+' '+p,'','')} })();")
|
|
4楼#
发布于:2015-12-07 20:17
還是不行。
|
|
5楼#
发布于:2015-12-07 19:59
|
|