Skip to content

Instantly share code, notes, and snippets.

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

Sarthak Dwivedi globalkonvict

🏠
Working from home
View GitHub Profile
@sezgi
sezgi / facebook-delete-all-group-members.js
Last active January 11, 2019 08:15
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 a')[i] && $$('.adminActions a')[i].click();
}