ringo-no-UTA

  • /*
     * @title ringo-no-UTA
     * @description get back memories on Ringo Sheena 15th memoirs page
     * @include http://sp.universal-music.co.jp/ringo/15th/special/*
     * @license MIT http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // c.f.
    // http://sp.universal-music.co.jp/ringo/15th/special/
    
    // UTA: Universal no Test ga Are
    // default invalid path (absolute + relative miss? WTF "PC_HTTP_RELATIVE")
    // http://sp.universal-music.co.jp/ringo/15th/special/PC_HTTP_RELATIVE/special/saga/st.htm
    // http://sp.universal-music.co.jp/ringo/15th/special/PC_HTTP_RELATIVE/special/plugin/000_1/index_j.htm
    // ...
    // valid path
    // http://sp.universal-music.co.jp/ringo/15th/special/saga/st.htm
    // http://sp.universal-music.co.jp/ringo/15th/special/plugin/000_1/index_j.htm
    // ...
    
    Array.prototype.slice.call(document.querySelectorAll('a[href*="PC_HTTP_RELATIVE"]')).forEach(function (link) {
        link.pathname = link.pathname.split('/').map(function (path, idx, ary) {
            return path === 'PC_HTTP_RELATIVE' ? (ary.splice(idx, 1), '') : path;
        }).filter(function (path) { return !!path; } ).join('/');
    });
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/11/20 08:49:24 - 2014-11-20
  2. 2014/11/20 08:29:45 - 2014-11-20