Skip to content

Instantly share code, notes, and snippets.

@nurumayuapp
Created May 4, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nurumayuapp/7394c724c74de9188255692fede6043d to your computer and use it in GitHub Desktop.
Save nurumayuapp/7394c724c74de9188255692fede6043d to your computer and use it in GitHub Desktop.
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