Created
May 4, 2019 11:56
-
-
Save nurumayuapp/7394c724c74de9188255692fede6043d to your computer and use it in GitHub Desktop.
Twitter auto-like script for Google Chrome
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
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