Subscribe Gists

    @@ -1,29 +1,32 @@ /* * @title Subscribe Gists - * @description Subscribe Public Gists (Atom). Use 'Packed'. This script must be needs mixed scripting(load from insecure server by Hatena::Let). + * @description Subscribe Public Gists (Atom). * @include https://gist.github.com/* * @license MIT License http://noromanba.mit-license.org/2012+ * @see https://support.google.com/chrome/bin/answer.py?hl=ja&answer=1342714 * @require */ -// first jQuery experience(by guesswork) +// [ATTENTION] +// This bookmarklet must be running on mixed scripting environment +// because callee server is use HTTP on 'http://hatelabo.jp'. +// Open 'Packed'link -> add prefix 'javascript' before use. + +// first jQuery experience(by guesswork) (function($){ var owner; if (/^https:\/\/gist\.github\.com\/\d+/.test(location.href) && $('#owner .name a').length) { owner = $('#owner .name a').text(); - console.info('::Let:: ' + '$ owner: ' + owner); + console.info('::Let:: ' + 'owner: ' + owner); } else if (/^https:\/\/gist\.github\.com\/(\w+)/.test(location.href)) { owner = RegExp.$1; - console.info('::Let:: ' + '// owner: ' + owner); + console.info('::Let:: ' + 'owner: ' + owner); } if (owner) { var feed = 'https://gist.github.com/' + owner + '.atom'; var reader = 'http://google.com/reader/view/feed/'; - console.info('::Let:: ' + 'reader: ' + reader + 'feed: ' + feed); - //console.info('::Let:: ' + 'addr: ' + reader + encodeURIComponent(feed)); location.href = reader + encodeURIComponent(feed); } })(jQuery); void(0);
  • /*
     * @title Subscribe Gists
     * @description Subscribe Public Gists (Atom).
     * @include https://gist.github.com/*
     * @license MIT License http://noromanba.mit-license.org/2012+
     * @see https://support.google.com/chrome/bin/answer.py?hl=ja&answer=1342714
     * @require 
     */
    
    
    // [ATTENTION]
    // This bookmarklet must be running on mixed scripting environment
    // because callee server is use HTTP on 'http://hatelabo.jp'.
    // Open 'Packed'link -> add prefix 'javascript' before use.
    
    // first jQuery experience(by guesswork)
    (function($){
        var owner;
        if (/^https:\/\/gist\.github\.com\/\d+/.test(location.href) && $('#owner .name a').length) {
            owner = $('#owner .name a').text();
            console.info('::Let:: ' + 'owner: ' + owner);
        } else if (/^https:\/\/gist\.github\.com\/(\w+)/.test(location.href)) {
            owner = RegExp.$1;
            console.info('::Let:: ' + 'owner: ' + owner);
        }
    
        if (owner) {
            var feed = 'https://gist.github.com/' + owner + '.atom';
            var reader = 'http://google.com/reader/view/feed/';
            location.href = reader + encodeURIComponent(feed);
        }
    })(jQuery); void(0);
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2012/03/12 01:34:51 - 2012-03-12
  2. 2012/02/19 20:17:29 - 2012-02-19
  3. 2012/02/19 19:29:37 - 2012-02-19
  4. 2012/02/19 19:28:54 - 2012-02-19
  5. 2012/02/17 08:01:52 - 2012-02-17