Last active
July 17, 2023 14:00
-
-
Save rjmacarthy/c0d6a2b1533bfe640b15289785571f7e to your computer and use it in GitHub Desktop.
mass unfollow 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
function unfollow() { | |
const elements = document.querySelectorAll('[data-testid=cellInnerDiv]') | |
elements.forEach((element) => { | |
const buttons = element.querySelectorAll('[role="button"]') | |
buttons.forEach((button) => { | |
if (button.innerText === 'Following') { | |
button.click() | |
const unfollowButton = document.querySelector('[data-testid="confirmationSheetConfirm"]') | |
unfollowButton.click() | |
} | |
}) | |
}) | |
} | |
setInterval(unfollow, 1000) | |
// Keep doom scrolling down to oblivion. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment