ブックマークレット作成

この記事には広告が含まれます

google検索結果を1年以内のもの、期間指定なしを切り替える これ

javascript:(function(){ 
    n=";
    u=location.href; もともとのurl
    s=’&as_qdr=y1′;  urlの末尾にこれをつけることで1年以内のみ検索
    r=";
    if(u.match(s)){ 1年以内のみの条件が付いていたら、
        n=u.replace(s,r); 1年以内のみの条件分を空白行と入れ替える
        }else{if(u.match(r)){ 1年以内のみの条件が付いていなければ
            n=u+s; 末尾に1年以内の条件を付ける
        }
    };
    if(n){
        window.open(n,’_blank’,"); 上で作成したurlを開く
    }
})();

改行を削ってブックマークバーへ置く

内容

javascript:(function(){
    n=";
    u=location.href;
    s=’&as_qdr=y1′;
    r=";
    if(u.match(s)){
        n=u.replace(s,r);
        }else{if(u.match(r)){
            n=u+s;
        }
    };
    if(n){
        window.open(n,’_blank’,");
    }
})();

YouTubeのurlをseesaaで貼り付けやすいように

javascript:(function(){
    n=";
    u=location.href;
    s=’feature=player_embedded&’;
    r=";
    if(u.match(s)){
        n=u.replace(s,r);
        }else{if(u.match(r)){
            n=u.replace(r,s);
        }
    };
    if(n){
        window.open(n,’_blank’,");
    }
})();

DropBoxの画像に直リン

javascript:(function(){
    n=";
    u=location.href;
    s=’feature=player_embedded&’;
    r=";
    if(u.match(s)){
        n=u.replace(s,r);
        }else{if(u.match(r)){
            n=u.replace(r,s);
        }
    };
    if(n){
        window.open(n,’_blank’,");
    }
})();

Amazon 短いurlに変換

javascript:
var%20asin=document.getElementById('ASIN’).value;
location.href=’https://amazon.jp/dp/’+asin;

たまメモとたまトラ切り替え

javascript:(function(){
    n=";
    u=location.href;
    s=’https://tama36travel.seesaa.net/’;
    r=’https://tama36memo.seesaa.net/’;
    if(u.match(s)){
        n=u.replace(s,r);
        }else{if(u.match(r)){
            n=u.replace(r,s);
        }
    };
    if(n){
        window.open(n,’_blank’,");
    }
})();

favineko

javascript:
(function(){
    n=";
    u=location.href;
    s=’feature=player_embedded&’;
    r=";
    if(u.match(s)){
        n=u.replace(s,r);
        }else{if(u.match(r)){
            n=u.replace(r,s);
        }
    };
    if(n){
        window.open(n,’_blank’,");
    }
})();

 

 

Viewport resizer (webサービス用)
モバイル用に縮小表示してくれるサービスのブックマークレット
詳細はhttps://coliss.com/articles/build-websites/operation/javascript/bookmarklet-viewport-resizer.html 

日記

Posted by tama