/*
* @title 以後のツイート表示
* @description Twitterの個別ツイート(https://twitter.com/<name>/status/<id>)以後のタイムラインを表示
* @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');
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()
})