Skip to content

Instantly share code, notes, and snippets.

View nbouliol's full-sized avatar
🏠
Working from home

Nicolas Bouliol nbouliol

🏠
Working from home
View GitHub Profile
@nbouliol
nbouliol / facebook-delete-all-group-members.js
Last active September 15, 2017 14:43 — forked from sezgi/facebook-delete-all-group-members.js
Deletes all group members from a facebook group except yourself. Leaving the group after running this in the javascript console will delete the group. Tested on Chrome May 29, 2017. If your network is super slow, you might want to increase the timeout delay.
// removes your box from the page so you don't get removed from the group
$$('[data-name=GroupProfileGridItem]')[0].remove();
// member action dropdowns
const actions = $$('.adminActions');
// open all dropdowns so they're added to the DOM
for (var i = 0; i < actions.length; i++) {
$$('.adminActions button')[i] && $$('.adminActions button')[i].click();
}