RADicon

  • /*
     * @title RADicon
     * @description show random entry on Hatena Blog w/ RAD
     * @include http://*
     * @license MIT http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // TBD keyboard shortcut
    
    // c.f. RAD.js
    // https://github.com/dlwr/dlwr.github.io/blob/master/js/RAD.js
    // https://gist.github.com/dlwr/5414f1be48f75a3d401d
    (function () {
        // detect Hatena Blog c.f.
        // https://gist.github.com/noromanba/2725191
        var Hatena = window.Hatena || {};
        if (!document.querySelector('iframe#globalheader') || !Hatena.Diary) return;
    
        // http://djbudo.hatenablog.com/entry/2014/03/22/164434
        var ENDPOINT = 'http://219.94.245.80:3000/?blog=';
    
        location.href = ENDPOINT + location.hostname;
    })();
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/11/30 00:35:34 - 2014-11-30