Last active
March 27, 2018 08:50
-
-
Save lucahammer/b1f40a52bd159eee55c361832daf5956 to your computer and use it in GitHub Desktop.
Remove all Facebook apps at once. Blogpost: https://lucahammer.com/2018/03/21/remove-facebook-apps-one-click/
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
// collect all links to remove the apps | |
var delete_links = document.querySelectorAll('#delete-link'); | |
//click all collected links | |
for (var i = 0; i < delete_links.length; i++) { | |
delete_links[i].click(); | |
} | |
//wait five seconds for the confirmation boxes to load | |
//and click all confirmation boxes to remove the apps | |
setTimeout(function() { | |
var confirm_links = document.querySelectorAll('.dialog_content [name=ok]'); | |
for (var i = 0; i < delete_links.length; i++) { | |
confirm_links[i].click(); | |
} | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment