Created
August 22, 2011 07:40
-
-
Save ww24/1161867 to your computer and use it in GitHub Desktop.
新Twitter用一斉返信ブックマークレット
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var g=$("a.js-action-reply"),a="textarea.twitter-anywhere-tweet-box-editor",$t,n;for(var i=0,l=g.size();i<l;i++){t=g.eq(i);if(t.parent().find("a.js-action-replyAll").size()<1){n=t.data("screenName")||t.attr("data-screen-name");t.after('<a class="reply-action js-action-replyAll" href="#" title="一斉返信" data-screen-name="'+n+'" onclick="(function(){var t=$(\''+a+'\');t.val(\'@'+n+' \'+t.val())})();return false"><span><i></i><b>一斉返信</b></span></a>').data("screenName",n)}}})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setIntervalして新しく取得したツイートにも自動で適用させることもできるけど、重いので非推奨 | |
// setInterval(function() { | |
(function() { | |
var $target = $("a.js-action-reply"), | |
tweetArea = "textarea.twitter-anywhere-tweet-box-editor", | |
$t, | |
screenName = ""; | |
for (var i=0,l=$target.size(); i<l; i++) { | |
$t = $target.eq(i); | |
if ($t.parent().find("a.js-action-replyAll").size() < 1) { | |
screenName = $t.data("screenName") || $t.attr("data-screen-name"); | |
$t.after('<a class="reply-action js-action-replyAll" href="#" title="一斉返信" data-screen-name="'+screenName+'" onclick="(function(){var t=$(\''+tweetArea+'\');t.val(\'@'+screenName+' \'+t.val())})();return false"><span><i></i><b>一斉返信</b></span></a>') | |
.data("screenName", screenName); | |
} | |
} | |
})(); | |
//}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
更に新しいTwitterのUIが採用されたことで、使えなくなりました。
多分、少し変更すれば簡単に対応させることは可能。