Created
August 6, 2019 10:54
-
-
Save tanvirraj/96ced7f42f11ef17568f1384845b9f78 to your computer and use it in GitHub Desktop.
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