Forked from sarthaksavvy/# Follow Unfollow Javascript Script
Created
June 30, 2022 06:27
-
-
Save udaragangabadage/b224e5205bc42284f21a2900f905c3be to your computer and use it in GitHub Desktop.
Automate Unfollow/Follow
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
Check files inside this gist |
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
let btns = document.querySelectorAll("[data-testid]") | |
let followBtns = Array.from(btns).filter(btn => { | |
return btn.getAttribute('data-testid').includes('follow') | |
}) | |
for (let i = 1; i <= followBtns.length; i++) { | |
setTimeout(() => { | |
followBtns[i - 1].click() | |
}, 1000 * i); | |
} |
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
let btns = document.querySelectorAll("[data-testid]") | |
let unfollowBtns = Array.from(btns).filter(btn => { | |
return btn.getAttribute('data-testid').includes('unfollow') | |
}) | |
for (let i = 1; i <= unfollowBtns.length; i++) { | |
setTimeout(() => { | |
unfollowBtns[i-1].click() | |
setTimeout(() => { | |
document.querySelector("[data-testid='confirmationSheetConfirm']").click() | |
}, 500); | |
}, 1000 * i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment