1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna
\"pagination\"")[0]; var fragment = document.createDocumentFragment(); var tempDiv = document.createElement("div"); tempDiv.innerHTML = body; var i; if (tempDiv.children.length === 0) { tabsA.innerText = "All blogs have been unfollowed"; document.getElementById("unfollowall").parentNode. removeChild( document.getElementById("unfollowall") ); return; } for (i = 0; i < tempDiv.children.length; i++) { fragment.appendChild(tempDiv.children[0]); } var pagination = document.getElementById("pagination"); pagination.parentNode.insertBefore(fragment, pagination); nextUnFollow(); } }; xhttp2.open("GET", document.location.href, true); xhttp2.send(); } }, 50); } }; xhttp1.open("POST", "https://www.tumblr.com/svc/unfollow", true); xhttp1.setRequestHeader("X-tumblr-form-key", key); xhttp1.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhttp1.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded; charset=UTF-8" ); xhttp1.send(query); }; this.replaceChild( document.createTextNode("Wait Please"), this.firstChild ); this.classList.add("waitplease"); nextUnFollow(); }, {once: true}); var css = document.createElement("style"); css.type = "text/css"; css.appendChild( document.createTextNode(` @keyframes radorange { 0% { background-color: #f00; } 80% { background-color: #f66; } 100% { background-color: #f00; } } @keyframes fadein { 0% { opacity: 0; } 100% { background-color: 1; } } @keyframes blinky { 0% { opacity: 0; } 80% { background-color: 1; } 100% { background-color: 0; } } .follower.unfollowing { animation: blinky 300ms infinite ease-out both; } .follower { -webkit-transition: all 200ms ease-in-out; -moz-transition: all 200ms ease-in-out; -ms-transition: all 200ms ease-in-out; -o-transition: all 200ms ease-in-out; transition: all 200ms ease-in-out; position: relative; overflow: hidden; top: 0; left: 0; animation: fadein 400ms 1 ease-out both; } #unfollowall.waitplease { cursor: auto; } #unfollowall.waitplease, #unfollowall.waitplease:hover, #unfollowall.waitplease:active, #unfollowall { border: 0 none; animation: radorange 2s infinite ease-out both; } #unfollowall:hover { animation: radorange 200ms infinite ease-out both; } #unfollowall:active { animation: none; background-color: #fff; } `) ); document.head.appendChild(css); document.getElementById("tabs").insertBefore( unfollowAllButton, document.getElementById("tabs").firstChild ); }); // ==UserScript== // @name Tumblr - UnFollow All // @description Adds UnFollow All Button to Following Page // @version 1 // @grant none // @namespace https://jaketheblog.tumblr.com/unfollowall // @include https://www.tumblr.com/following // ==/UserScript== (function(){ var memoryElement = document.createElement("input"); memoryElement.type = "hidden"; memoryElement.id = "memory-element"; memoryElement.value = JSON.stringify([]); var unFollowAll = function(){ var xhr = function(){ var button = document.getElementById("unfollow-all-button"); var mem = document.getElementById("memory-element"); var page = parseInt(button.getAttribute("page")); var url = "https://www.tumblr.com/following"; if(page !== 0){ url += "/" + page; } var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if(this.readyState === 4 && this.status === 200){ var button = document.getElementById("unfollow-all-button"); var mem = document.getElementById("memory-element"); var page = parseInt(button.getAttribute("page")); var following = JSON.parse(mem.value); page += 25; button.setAttribute("page", page.toString()); var html = document.createElement("htmlparent"); html.innerHTML = this.responseText; var names = html.getElementsByClassName("name-link"); for(var i = 0; i < names.length; i++){ following.push(names[i].innerHTML.replace(/\s+/g,"")); } if(names.length === 0){ var unfollowFirst = function(firstun){ var mem = document.getElementById("memory-element"); var text = document.getElementById("unfollowing-now"); var button = document.getElementById("unfollow-all-button"); var following = JSON.parse(mem.value); if(following.length > 0){ if(typeof firstun === "undefined"){ following.shift(); mem.value = JSON.stringify(following); } text.innerHTML = following[0]; Tumblr.unfollow({ tumblelog: following[0], success: unfollowFirst }); }else{ text.innerHTML = "Every blog is gone. Reload the page."; button.parentNode.removeChild(button); } }; unfollowFirst(false); }else{ mem.value = JSON.stringify(following); xhr(); } } }; xhttp.open("GET", url, true); xhttp.send(); }; xhr(); }; var text = document.createElement("span"); text.style.color = "#cc3200"; text.id = "unfollowing-now"; text.appendChild( document.createTextNode("") ); var button = document.createElement("button"); button.id = "unfollow-all-button"; button.setAttribute("page","0"); button.className = "chrome blue big"; button.appendChild( document.createTextNode("UnFollow All") ); button.style.margin = "10px"; button.style.backgroundColor = "#cc3200"; button.style.borderColor = "#cc3200"; button.setAttribute( "onclick", unFollowAll.toString().substring(11).replace(/\}$/,"") ); document.getElementById("invite_someone"). parentNode. insertBefore( button, document.getElementById("invite_someone") ); document.getElementById("invite_someone"). parentNode. insertBefore( text, document.getElementById("invite_someone") ); document.getElementById("invite_someone"). parentNode. insertBefore( memoryElement, document.getElementById("invite_someone") ); })();