ETH官方钱包

前往
大廳
主題

火狐UC腳本:AddMenuPlus規則-站內搜

—— | 2016-04-07 13:36:33 | 巴幣 0 | 人氣 293

一、這不是小書籤工具Bookmarklet,二、之前的是關鍵字在前,例:
火狐 site:www.jamesdambrosio.com
現在是
site:www.jamesdambrosio.com 火狐

關鍵字在後是符合習慣,現代文字都是從左至右,也為了方便修改或增減,免得手殘動到site:www.jamesdambrosio.com


{
        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:
        var _document=document.commandDispatcher.focusedWindow.document;
        var p=prompt('請輸入想要在當前域內搜尋的關鍵字('+_document.location.hostname+'):','');
        if(p)_document.location.href='https://encrypted.google.com/search?q=site:'+_document.location.href.split('/')[2]+' '+encodeURIComponent(p);
        break;

        case 1:
        var _document=document.commandDispatcher.focusedWindow.document;
        var p=prompt('請輸入想要在當前域內搜尋的關鍵字('+_document.location.hostname+'):','');
        if(p)_document.location.href='https://www.baidu.com/s?ie=utf-8&wd=site:'+_document.location.href.split('/')[2]+' '+encodeURIComponent(p);
        break;

        case 2:
        var _document=document.commandDispatcher.focusedWindow.document;
        var p=prompt('請輸入想要在當前域內搜尋的關鍵字('+_document.location.hostname+'):','');
        if(p)_document.location.href='https://cn.bing.com/search?q=site:'+_document.location.href.split('/')[2]+' '+encodeURIComponent(p);
        break;
        }
        },
    },

創作回應

更多創作