YAKIUDON

    
      
  • /*
     * @title YAKIUDON
     * @description Googleの検索結果URLから余分なパラメータ削除するやつ https://gist.github.com/1977606
     * @include http://www.google.co.jp/search*
     * @include https://www.google.co.jp/search*
     * @license MIT License
     * @require 
     */
    
    var script = document.createElement('script');
    script.textContent = '(' + (function () {
      var u = location.href.split('?');
      var q = u[1].split('&'), n = [];
      for (var i = 0; i < q.length; i++)
        if (q[i].match(/^(?:q|tbm|tbs)=/))
          n.push(q[i]);
      var url = u[0].replace('www.', '') + '?' + n.join('&');
      var input = document.createElement('input');
      input.setAttribute('type', 'text');
      input.setAttribute('size', 60);
      input.setAttribute('value', url);
      document.getElementById('resultStats').appendChild(input);
    }).toString() + ')();';
    document.body.appendChild(script);
    document.body.removeChild(script);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2012/12/19 16:32:04 - 2012-12-19
  2. 2012/03/06 02:47:21 - 2012-03-06