以後のツイート表示

    @@ -31,7 +31,7 @@ if ($) $('body,html').animate({ scrollTop: $('li[data-item-id]:last').offset().top }, '0'); - setTimeout(c, 300) + if (!$ || !$('div.stream-end').is(':visible')) setTimeout(c, 300) } else { q.css('background', 'gold'); $('body,html').animate({
  • /*
     * @title 以後のツイート表示
     * @description Twitterの個別ツイート(https://twitter.com/<name>/status/<id>)以後のタイムライン約1日分を表示
     * @include https://twitter.com/*
     * @license MIT License
     * @javascript_url
     */
    
    
    (function (i, u, s, c, q, w) {
        w = window.open('https://twitter.com/search?q=' + encodeURIComponent('from:' + u + ' since_id:' + (function (i, o, u, c) {
            i = ('' + i).split('');
            o = '';
            u = 1;
            while (c = i.pop()) {
                c -= u - 10;
                o = c % 10 + o;
                u = c < 10 ? 1 : 0
            }
            return (1 < o.length && o[0] == '0') ? o = o.slice(1) : o
        })(i) + ' until:' + c(s + 3600 * 48)) + '&f=realtime');
        c = function ($) {
            $ = (function () {
                try {
                    return w.$
                } catch (e) {
                    return 0
                }
            })();
            if (!$ || !(q = $("li[data-item-id='" + i + "']"))[0]) {
                if ($) $('body,html').animate({
                    scrollTop: $('li[data-item-id]:last').offset().top
                }, '0');
                if (!$ || !$('div.stream-end').is(':visible')) setTimeout(c, 300)
            } else {
                q.css('background', 'gold');
                $('body,html').animate({
                    scrollTop: q.offset().top - $(w).height() / 2
                }, '0')
            }
        };
        c()
    })($('div.opened-tweet').attr('data-item-id'), $('div.opened-tweet').attr('data-screen-name'), parseInt($('div.opened-tweet span[data-time]').attr('data-time')), function (s, d) {
        d = new Date(1000 * s);
        return d.getUTCFullYear() + '-' + (1 + d.getUTCMonth()) + '-' + d.getUTCDate()
    })
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2014/03/21 21:55:18 - 2014-03-21
  2. 2014/03/21 21:41:46 - 2014-03-21
  3. 2014/03/21 19:56:49 - 2014-03-21
  4. 2014/03/21 19:21:00 - 2014-03-21
  5. 2014/03/21 19:19:00 - 2014-03-21