Qiita diff+

  • /*
     * @title Qiita diff+
     * @description improvement diff view on Qiita
     * @include http://qiita.com/Qiita/items/*
     * @include http://qiita.com/Qiita_en/items/*
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // e.g.
    // http://qiita.com/Qiita/items/c686397e4a0f4f11683d/revisions/18
    // http://qiita.com/Qiita_en/items/c170159cd313d982429e/revisions/1
    
    (function () {
        if (!/qiita.com$/.test(location.hostname) ||
            !(location.pathname.split('/').indexOf('revisions') > -1)) { // ES7 Array|String#includes
            return;
        }
    
        // TBD show diff only
        // jump
        var diff = document.querySelector('.remove, .add');
        if (!diff) return;
    
        diff.scrollIntoView();
    })();
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/05/23 07:11:41 - 2015-05-23
  2. 2015/05/22 05:58:00 - 2015-05-22