Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Twitter auto-like script for Google Chrome
var sum = 0;
var count = 0;
var $counter = $('<div style="position: fixed; width: 300px; min-height: 20px; bottom: 14px; right: 14px; background: rgba(0,0,0,0.7); border-radius: 10px;"></div>');
$('body').append($counter);
var autoLike = function () {
var i = 0;
var time = 0;
$('.ProfileTweet-actionButton.js-actionButton.js-actionFavorite').each(function (index, element) {
if ($(element).is(':visible')) {
time = i * 2000;
i++;
sum++;
setTimeout(function () {
count++;
$counter.html('<div style="color: #fff; text-align: center; padding: 20px 0;">' + count + '/' + sum + '件いいねしました!</div>')
$(element).click();
}, time);
}
});
setTimeout(function () {
var $body = $('html, body');
$body.animate({
scrollTop: $body[0].scrollHeight
});
setTimeout(function () {
autoLike();
}, 5000);
}, time)
};
autoLike();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.