非公開 マストドン横断検索 (自分用)

    @@ -2,6 +2,7 @@ * @title マストドン横断検索 (グローバル汚染回避版) * @description 自分用です。 * @include * + * @license MIT License * @javascript_url */ @@ -11,8 +12,13 @@ 元のスクリプトが書かれてあるサイト : http://mastodonsearch.jp/ + +縮めたもの : +(k=>{k&&open('http://mastodonsearch.jp/cross/?distinct=1&q='+encodeURIComponent(k))})((''+getSelection())||prompt('検索ワード','')); */ -(k => +(k => { k && open('http://mastodonsearch.jp/cross/?distinct=1&q=' + encodeURIComponent(k)) -)(('' + getSelection()) || prompt('検索ワード', '')); +})( + ('' + getSelection()) || prompt('検索ワード', '') +);
  • /*
     * @title マストドン横断検索 (グローバル汚染回避版)
     * @description 自分用です。
     * @include *
     * @license MIT License
     * @javascript_url 
     */
    
    /*
    元のスクリプト (PublicDomain https://mstdn.jp/users/mastodonsearch/updates/951700) : 
    var txt=window.getSelection().toString();var key=window.prompt("横断検索したい言葉を入力",txt);if(key!=null){window.open("http://mastodonsearch.jp/cross/?q="+encodeURIComponent(key)+"&distinct=1")};
    
    元のスクリプトが書かれてあるサイト :
    http://mastodonsearch.jp/
    
    縮めたもの :
    (k=>{k&&open('http://mastodonsearch.jp/cross/?distinct=1&q='+encodeURIComponent(k))})((''+getSelection())||prompt('検索ワード',''));
    */
    
    (k => {
    	k && open('http://mastodonsearch.jp/cross/?distinct=1&q=' + encodeURIComponent(k))
    })(
    	('' + getSelection()) || prompt('検索ワード', '')
    );
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2017/05/07 23:24:16 - 2017-05-07
  2. 2017/04/21 09:20:01 - 2017-04-21
  3. 2017/04/20 12:27:20 - 2017-04-20
  4. 2017/04/20 12:21:47 - 2017-04-20
  5. 2017/04/19 23:42:16 - 2017-04-19
  6. 2017/04/19 23:40:17 - 2017-04-19