Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@E3V3A
Forked from Chainfire/twitter_unfollow.js
Created April 22, 2014 19:54
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 E3V3A/11192187 to your computer and use it in GitHub Desktop.
Save E3V3A/11192187 to your computer and use it in GitHub Desktop.
var delay = 250;
var until = 'faux123';
var a = new Array();
$('button[class*=follow-btn]').each(function() {
var attr = $(this).parent().attr('data-screen-name');
if (attr != undefined) {
if (attr == until) {
return false;
}
a.push(this);
}
});
function unfollow() {
if (a.length == 0) {
'done!';
return;
} else {
var button = a.pop();
$(button).click();
setTimeout('unfollow()', delay);
}
}
unfollow();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment