Youtube auto-redirector

  • /*
     * @title Youtube auto-redirector
     * @description auto redirect on Youtube
     * @include http://www.youtube.com/redirect*
     * @include https://www.youtube.com/redirect*
     * @license MIT http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    (function () {
        if (!/^www\.youtube\.com\/redirect/.test(location.hostname + location.pathname)) return;
    
        var link = document.querySelector('#content-container a[href]');
        if (!link || !link.href) return;
    
        location.href = link.href;
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/11/05 01:34:21 - 2014-11-05
  2. 2014/11/04 07:07:40 - 2014-11-04
  3. 2014/11/03 03:28:18 - 2014-11-03