Skip to content

Instantly share code, notes, and snippets.

@amytych
Last active August 29, 2015 14:08
Show Gist options
  • Save amytych/0ecc15c5d5676c8d0219 to your computer and use it in GitHub Desktop.
Save amytych/0ecc15c5d5676c8d0219 to your computer and use it in GitHub Desktop.
Fito Props
// Sometimes activity stream is so long
// it's not possible to keep up with it
// and everyone deserves a prop for their effort
var propCounter = 0;
var interval = setInterval(function() {
var $propers = $('.give_prop'), $proper;
if ($propers.length) {
$proper = $propers.first();
console.log($proper.parents('.stream_item').find('.stream-author').text());
$("html, body").animate({ scrollTop: $proper.offset().top }, 150);
$proper.trigger('click');
propCounter++;
} else {
clearInterval(interval);
console.log('Done!', propCounter, 'props given!');
}
}, 2300); // Just enough time to check the activity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment