3

Early last year Clayton Lambert posted a script on his blog which allowed you to automatically block users following you that were using the default Twitter profile image 'egg'.

var unList = [];
alert(“Processing”);
$('.ProfileCard').each(function(){
    if($(this).find('.ProfileCard-avatarImage').attr('src').indexOf("default_profile_images/default_profile") >= 0){unList.push($(this));   }});
unList.forEach(function(acc){
        if(($('.alert-messages .hidden'))){ $('.alert-messages').remove();}
        $(acc).find('.user-dropdown').trigger('click');
        $(acc).find('.block-text').find('.dropdown-link').trigger('click');
        $('.block-button').trigger('click');
});
alert(“Done”);

How could this script be modified to instead automatically block users following you that you're not following back?

That is, what would need to be adjusted to allow the script to detect whether or not the follow button said 'Following' or 'Follow' and then only block the users with the 'Follow' button?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.