-
-
Save eolszewski/cc651b72e36a4f0e2c5ab8307d1ecee8 to your computer and use it in GitHub Desktop.
Unfollow everyone you're currently following on Twitter
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
// ==================== | |
// UPDATED JULY 31, 2019 | |
// ==================== | |
// Unfollow everyone, by Eric Olszewski (https://twitter.com/hrdwrknvrstps) | |
// | |
// 1. Go to https://twitter.com/YOUR_USER_NAME/following | |
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac) | |
// 3. Paste this into the Developer Console and run it | |
// Note: Twitter | |
(() => { | |
const method = () => { | |
const group = Array.from(document.querySelectorAll('[data-testid$="-unfollow"]')); | |
if (group.length > 0) { | |
group.forEach((btn) => btn.click()); | |
const confirms = Array.from(document.querySelectorAll('[data-testid="confirmationSheetConfirm"]')); | |
confirms.forEach((btn) => btn.click()); | |
window.scrollBy(0,80*group.length); | |
setTimeout(method, 2000); | |
} else { | |
console.log('Done'); | |
} | |
}; | |
method(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment