// ==UserScript==
// @name Tumblr - UnFollow All
// @namespace http://script.b9mx.com/tumblr-unfollow-all.user.js
// @description Adds a button to unfollow all the blogs at once.
// @include https://www.tumblr.com/following
// @include https://www.tumblr.com/following/*
// @version 3
// @grant none
// ==/UserScript==
window.done = 0;
window.followings = [];
window.unfollows = function(){
jQuery('#un_row input').val(window.followings[0]);
window.Tumblr.unfollow({
tumblelog:window.followings[0]
},{
complete:function(){
window.followings.shift();
if(window.followings.length > 0)
window.unfollows();
else
window.fullow();
}
});
}
window.fullow = function(){
if(window.done === 0) {
var c = confirm('Are you sure you want to unFollow all blogs?');
if(!c) return false;
jQuery('#un_row input').unbind('click.once');
window.done = 1;
}
if(window.done !== 2){
jQuery.get('https://www.tumblr.com/following', function(x){
var trim = new RegExp("^[\s\S]*?]*?>|<\/body>[\s\S]*?$|"+
"