Created
May 6, 2017 21:01
-
-
Save max-frai/2243e4c8423c04f1b262d4a4eccb9ed6 to your computer and use it in GitHub Desktop.
Remove outgoing facebook friend requests
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
var interval = window.setInterval(function() { | |
var moreButton = document.querySelector('a[ajaxify*="outgoing/more"]'); | |
if (moreButton) | |
{ | |
moreButton.click(); | |
console.log('loading more...'); | |
} | |
else | |
{ | |
//window.clearInterval(interval); | |
var outgoing = document.querySelector('button.FriendRequestOutgoing'); | |
if (!outgoing) | |
{ | |
window.clearInterval(interval); | |
console.log('FINISH'); | |
} | |
else | |
{ | |
try { | |
outgoing.click(); | |
document.querySelector('li.FriendListCancel').click(); | |
window.setTimeout(function() { | |
document.querySelector('button.layerConfirm').click(); | |
outgoing.parentNode.removeChild(outgoing); | |
}, 500); | |
}catch(e) {console.log(e);} | |
} | |
} | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Remove outgoing facebook friend requests part 2.