Expand Hatena::Star

    @@ -7,15 +7,21 @@ */ // http://os0x.g.hatena.ne.jp/os0x/20080502/1209724672 +console.time('*runtime'); (function(Hatena) { if (typeof Hatena === 'undefined') return; - + var ei = 0; + // TODO doubleness exec Hatena.Star.EntryLoader.entries.forEach(function (entry) { - entry.stars.some(function (star) { - if(star && star.showInnerStars) { + console.info('*ei:', ei++); + entry.stars.some(function (star, idx) { + console.info('*idx:', idx); + if (star && star.count && star.showInnerStars) { star.showInnerStars(); + console.info('*expand:'); return true; // rustic } }); }); -})(window.Hatena); +})(window.Hatena); +console.timeEnd('*runtime'); //*runtime: 47ms -> *runtime: 57ms on http://d.hatena.ne.jp/amachang/
  • /*
     * @title Expand Hatena::Star
     * @description Expand Hateha::Star handle colored stars
     * @include http://*
     * @license MIT License http://nrm.mit-license.org/2012
     * @require 
     */
    
    // http://os0x.g.hatena.ne.jp/os0x/20080502/1209724672
    console.time('*runtime');
    (function(Hatena) {
        if (typeof Hatena === 'undefined') return;
        var ei = 0;
        // TODO doubleness exec
        Hatena.Star.EntryLoader.entries.forEach(function (entry) {
            console.info('*ei:', ei++);
            entry.stars.some(function (star, idx) {
                console.info('*idx:', idx);
                if (star && star.count && star.showInnerStars) {
                    star.showInnerStars();
                    console.info('*expand:');
                    return true; // rustic
                }
            });
        });
    })(window.Hatena);
    console.timeEnd('*runtime'); //*runtime: 47ms -> *runtime: 57ms on http://d.hatena.ne.jp/amachang/
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/12/11 03:55:50 - 2014-12-11
  2. 2014/11/22 06:03:33 - 2014-11-22
  3. 2014/11/21 01:34:31 - 2014-11-21
  4. 2012/04/23 21:27:25 - 2012-04-23
  5. 2012/04/23 19:26:29 - 2012-04-23
  6. 2012/04/23 19:22:30 - 2012-04-23
  7. 2012/04/23 19:10:13 - 2012-04-23
  8. 2012/04/23 18:55:00 - 2012-04-23
  9. 2012/04/23 18:16:42 - 2012-04-23
  10. 2012/04/23 17:13:56 - 2012-04-23