非公開 歌詞ナビの歌詞抽出

    
      
  • /*
     * @title 歌詞ナビの歌詞抽出
     * @description 歌詞ナビで表示される歌詞をテキストで抽出(元の歌詞(Flash)直前にPREで追加)
     * @include http://kashinavi.com/song_view.html?*
     * @license MIT License
     * @javascript_url
     */
    
    (function(w, d){
    var check = function(){
        var $ = w.$;
        if (!$) {
            if (!d.getElementById('_jq')) {
                var script = d.createElement('script');
                script.id = '_jq';
                script.src='//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js';
                d.documentElement.appendChild(script);
            }
            setTimeout(check, 100);
            return;
        }
        $.post(
            'http://kashinavi.com/cgi-bin/kashi.cgi',
            {
                kdifoe88: 'smx;paa',
                file_no: $('link[rel="canonical"]:first').attr('href').match(/\/song_view\.html\?(\d+)/)[1]
            },
            function(result){
                var elm = $('<pre/>');
                elm.text(result.replace(/^kashi=.*?\n+/,'')).css({border:'double 3px orange', padding:'4px', 'text-align':'left'});
                $('object#aaa').before(elm);
            },
            'html'
        );
    };
    
    check();
    })(window, document);
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/07/08 11:31:07 - 2015-07-08
  2. 2015/07/06 12:11:37 - 2015-07-06