Skip to content

Instantly share code, notes, and snippets.

@yaroslav-ilin
Last active June 21, 2018 17:12
Show Gist options
  • Save yaroslav-ilin/44b53fbd9c64900514c2 to your computer and use it in GitHub Desktop.
Save yaroslav-ilin/44b53fbd9c64900514c2 to your computer and use it in GitHub Desktop.
To unfollow everybody on Twitter
- goto https://twitter.com/following
- make sure you haven't loaded mobile version of website
- open up Developer tools (in Chrome press Control+Shift+J)
- put content of unflw.js script into Console and hit Enter
- feel free to close website after some time
(function () {
function scrlAndUnflw () {
window.scrollTo(0, Math.max(
document.body.scrollHeight, document.documentElement.scrollHeight,
document.body.offsetHeight, document.documentElement.offsetHeight,
document.body.clientHeight, document.documentElement.clientHeight
));
Array.prototype.forEach.call(document.querySelectorAll('.ProfileCard-content'), profile => {
if (profile.querySelectorAll('.FollowStatus').length) {
return;
}
profile.querySelector('.following .user-actions-follow-button').click();
});
}
scrlAndUnflw();
return setInterval(scrlAndUnflw, 1000);
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment