-
-
Save joeleonjr/dcefb8ec83bedfed6ac782435e9d08b3 to your computer and use it in GitHub Desktop.
Twitter Nuclear Unfollow
This file contains hidden or 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
// 1. Go to your Following page. Mine would be https://twitter.com/nytr0gen_/following | |
// 2. Run this script in the Console. Change maxUnfollows to anything you want. | |
// 3. Check in from time to time and run it again if it fails. | |
sendUnfollow = () => document.querySelector('[data-testid=UserCell] [data-testid*=unfollow] span span').click(); | |
confirmUnfollow = () => document.querySelector('[data-testid=confirmationSheetConfirm] span span').click(); | |
sleep = ms => new Promise(r => setTimeout(r, ms)); | |
i = 0; | |
maxUnfollows = 1000; | |
recursiveUnfollow = () => { | |
if (i++ > maxUnfollows) { return; } | |
sendUnfollow(); | |
sleep(200).then(() => { | |
confirmUnfollow(); | |
window.scrollBy(0, 110); | |
return sleep(200); | |
}).then(() => recursiveUnfollow()); | |
}; | |
recursiveUnfollow(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment