Last active
December 9, 2020 14:36
-
-
Save husnulhamidiah/8cc4b8fbc560e23096c059155917e1a1 to your computer and use it in GitHub Desktop.
Auto Accept Instagram Following Request Script
This file contains hidden or 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
/** | |
1. Open https://www.instagram.com/accounts/activity?followRequests=1 | |
2. Open console and paste this code | |
Refs: https://stackoverflow.com/q/10351658 | |
**/ | |
function findButtonByTextContent(text) { | |
var result = [] | |
var buttons = document.querySelectorAll('button'); | |
for (var i=0, l=buttons.length; i<l; i++) { | |
if (buttons[i].firstChild.nodeValue == text) | |
result.push(buttons[i]) | |
} | |
return result | |
} | |
function autoClick(text, interval) { | |
var buttons = findButtonByTextContent(text) | |
buttons.forEach(function(button, index) { | |
setTimeout(function timer() { | |
button.click() | |
}, index * interval) | |
}) | |
} | |
autoClick('Confirm', 2500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment