Last active
August 5, 2021 12:49
-
-
Save himanshu8dev/2bb2058d76326dd53fc189735616c4dd to your computer and use it in GitHub Desktop.
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
| function unfollowProcess() { | |
| init = function(){ | |
| var requestButton = this.getMainButton() | |
| setTimeout(function() { | |
| requestButton.onclick = this.unfollow(); | |
| // console.log(requestButton); | |
| requestButton.click(); | |
| }, 5000); | |
| }, | |
| getMainButton = function() { | |
| let buttons = document.querySelectorAll('button'); | |
| requestButton = false; | |
| buttons.forEach(function(k,v){ | |
| var btn = buttons[v]; | |
| if(btn.innerHTML == 'Requested') { | |
| requestButton = btn; | |
| return; | |
| } | |
| }) | |
| return requestButton; | |
| }, | |
| unfollow = function(){ | |
| setTimeout(function(){ | |
| var popupButton = document.querySelectorAll('button'); | |
| popupButton.forEach(function(k,v){ | |
| var btn = popupButton[v]; | |
| if(btn.innerHTML == 'Unfollow') { | |
| // console.log(btn); | |
| btn.click(); | |
| } | |
| }) | |
| }, 6000); | |
| } | |
| init(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment