Last active
April 24, 2024 08:24
-
-
Save alexkubica/aff2f1a24296c8e62696415c8ff57ff2 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
// go to https://warpcast.com/alexk/following, replace alexk with you fname | |
// scroll down to load following list | |
// open console by right clicking the page and going to inspect mode, select Console tab | |
// copy paste the following code and hit enter | |
// you might get rate limited so refresh and try again after a few minutes | |
(() => { | |
// Function to unfollow with delay | |
let index = 0; | |
const intervalId = setInterval(() => { | |
const buttons = Array.from(document.querySelectorAll('button')); | |
// Filter buttons that have 'Unfollow' as their text | |
const unfollowButtons = buttons.filter(button => button.textContent.toLowerCase().trim() === 'unfollow'); | |
// scroll to bottom to load more buttons | |
window.scrollTo({ | |
top: document.body.scrollHeight, | |
behavior: 'smooth' | |
}); | |
if (unfollowButtons.length === 0) { | |
clearInterval(intervalId); // Stop the interval when done | |
console.log('Finished unfollowing everyone.'); | |
} else { | |
unfollowButtons[0].click(); // Click the first button to unfollow it | |
console.log(`Unfollowed ${index + 1} user(s).`); | |
index++; | |
} | |
}, 1000); // Delay of 1000 milliseconds (1 second) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment