Skip to content

Instantly share code, notes, and snippets.

@lucahammer
Last active March 27, 2018 08:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucahammer/b1f40a52bd159eee55c361832daf5956 to your computer and use it in GitHub Desktop.
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/
// 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