Last active
June 19, 2019 18:14
-
-
Save nurumayuapp/3f799913e341edb2cc7b67954700421e to your computer and use it in GitHub Desktop.
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 * 10000; | |
i++; | |
sum++; | |
setTimeout(function () { | |
count++; | |
$counter.html('<div style="color: #fff; text-align: center; padding: 20px 0;">' + count + '/' + sum + '件いいねしました!</div>') | |
$(element).click(); | |
$(element).hide(); | |
}, time); | |
} | |
}); | |
setTimeout(function () { | |
var $btn = $('.js-new-tweets-bar'); | |
$btn.click() | |
var $body = $('html, body'); | |
$body.animate({ | |
scrollTop: 0 | |
}); | |
setTimeout(function () { | |
autoLike(); | |
}, 10000); | |
}, time) | |
}; | |
autoLike(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment