Skip to content

Instantly share code, notes, and snippets.

@DanBUK
Last active August 29, 2015 14:05
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 DanBUK/558ed611276cbc6b01d7 to your computer and use it in GitHub Desktop.
Save DanBUK/558ed611276cbc6b01d7 to your computer and use it in GitHub Desktop.
var unfav = document.getElementsByClassName('with-icn unfavorite js-tooltip')[0];
var fav = document.getElementsByClassName('with-icn favorite js-tooltip')[0];
var count = 0;
var max_count = 100;
var timInterval = setInterval(function () {
fav.click();
setTimeout(function () {
unfav.click();
count++;
if (count == max_count) clearInterval(timInterval);
}, 1000);
}, 2500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment