Followerlet

  • /*
     * @title Followerlet
     * @description cyclic shift Follower numbers on Twitter
     * @include http://twitter.com/*
     * @include https://twitter.com/*
     * @contributor hayashit  http://let.hatelabo.jp/hayashit/let/hJmfw-X-kZxq (Fork of)
     * @license MIT License http://opensource.org/licenses/MIT
     * @javascript_url
     */
    
    // @javascript_url; for over the mixed-content blocker c.f.
    // http://let.hatelabo.jp/help#at-javascript_url
    // https://gist.github.com/noromanba/7015739 (ja)
    
    // mixed-content c.f.
    // https://developer.mozilla.org/en-US/docs/Security/MixedContent
    // https://support.google.com/chrome/answer/1342714
    
    
    // alt. c.f.
    // http://hisayoshihayashi.com/followerlet/
    // http://let.hatelabo.jp/hayashit/let/hJmfw-aXqZps
    
    // e.g.
    // https://twitter.com/twitter/
    
    // TODO
    // - independent from jQuery
    //  http://let.hatelabo.jp/noromanba/let/hLHXxcqoxYJ8
    (function(f, s) {
      s = document.createElement("script");
      s.src = "//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js";
      s.onload = function() {
        f(window.jQuery.noConflict(true));
      };
      document.body.appendChild(s);
    })(function($) {
      var f_dom = $('.ProfileNav-item--followers .ProfileNav-value');
      if( !f_dom.size() ) f_dom = $('.DashboardProfileCard-statLink[href="/followers"] .DashboardProfileCard-statValue');
      var follower = f_dom.text();
      var pad_f = Math.floor( parseInt(follower) * 100 + Math.random() * parseInt(follower) );
      f_dom.text( String(pad_f).replace( /(\d)(?=(\d\d\d)+(?!\d))/g, '$1,') );
    });
    
    
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2015/06/26 06:42:40 - 2015-06-26
  2. 2015/06/26 04:57:59 - 2015-06-26
  3. 2015/06/26 04:56:37 - 2015-06-26