Twitter Unfollower

Automatic Twitter unfollower tool. Last Update: 11-22-2014

Fra 22.11.2014. Se den seneste versjonen.

// ==UserScript==
// @name         Twitter Unfollower
// @version      0.2
// @description  Automatic Twitter unfollower tool. Last Update: 11-22-2014
// @author       [email protected]
// @namespace    https://greasyfork.runtimutd.eu.org/en/users/6473-ekin
// @match        https://twitter.com/following
// @grant        none
// ==/UserScript==

$(function() {
    
    var config = {
        loadingTime: 1000,
        intervalTime: 2000
    };
    
    $(".UserActions-editButton").before('<button type="button" id="unfollowBtn" class="edit-button btn"><span class="button-text unfollow-text">Start Unfollowing</span></button> ');

    function unfollowAll() {
        $(".user-actions").each(function() {
			if (/not-following/i.test($(this).attr("class")) == false) {
            	$(this).children(".follow-button").trigger("click");
            }
		});  
    }
    
    function unfollowInit() {
        unfollowAll(); 
        setInterval(function() {
            $("html, body").animate({ scrollTop: $(document).height() }, 500);
            setTimeout(function() {
                unfollowAll();
            }, config.loadingTime);
        }, config.intervalTime);
    }
    
    $("#unfollowBtn").click(function() {
        unfollowInit();
    });
    
});