Created
September 26, 2018 05:48
-
-
Save TheBlackParrot/dc9cf138ecd0c9796016917b771982d8 to your computer and use it in GitHub Desktop.
Unwatches everyone on FurAffinity's "Manage my Watches" page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var script = document.createElement("script"); | |
script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"); | |
script.addEventListener('load', function() { | |
var script = document.createElement("script"); | |
document.body.appendChild(script); | |
var links = $('.flex-item-watchlist-controls a[href^="/unwatch/"]'); | |
for(let idx in links) { | |
let link = links[idx]; | |
let user = link.href.split("/")[4]; | |
setTimeout(function() { | |
$.ajax(link.href) | |
.done(function() { | |
console.log("unfollowed " + user); | |
}) | |
.fail(function() { | |
console.log("failed to unfollow " + user); | |
}) | |
.always(function() { | |
let num = parseInt(idx, 10) + 1; | |
console.log("[" + num + "/" + links.length + "] attempted to unfollow " + user); | |
}); | |
}, 750*idx); | |
setTimeout(function() { | |
window.location.href = window.location.href; | |
}, 750*links.length); | |
} | |
}, false); | |
document.body.appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment