表を「如月千早」でフィルタ

    
      
  • /*
     * @title       表を「如月千早」でフィルタ
     * @description 表の中で内容が "如月千早" だけの枡目(TD)を持つ行(TR)のみ表示する。<URL:http://imas-db.jp/song/idol/chi.html> での使用を推奬。
     * @include http://*
     * @license     MIT License
     * @author      MORIYAMA Hiroshi <hiroshi@kvd.biglobe.ne.jp> (Twitter: @moriyama164, Hatena: mhrs)
     * @copyright   © 2012 MORIYAMA Hiroshi
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     * 
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     * 
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
     * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
     * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     * SOFTWARE.
     */
    
    var nodes = document.evaluate("descendant::table/descendant::tr["
                                  + "not(descendant::th)"
                                  + " and count(descendant::td["
                                  + "translate(., ' \t\r\n\u00a0\u3000', '')" /* remove whitespaces */
                                  + " = '\u5982\u6708\u5343\u65E9']) = 0]",
                                  document, null, 6, null);
    for (var i = 0, node; i < nodes.snapshotLength; i++) {
      node = nodes.snapshotItem(i);
      node.parentNode.removeChild(node);
    }
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2012/06/09 13:38:07 - 2012-06-09
  2. 2012/06/08 15:39:52 - 2012-06-08
  3. 2012/06/08 14:56:27 - 2012-06-08
  4. 2012/06/08 14:12:02 - 2012-06-08
  5. 2012/06/08 13:49:49 - 2012-06-08