Remove Facebook group members
Published in
1 min readOct 22, 2019
- Go to group
- Members tab
- Paste this script that manually clicks on items and does the job for you
setInterval(function() {
if (document.querySelector('[role="button"][action="cancel"]')) {
document.querySelector('[role="button"][action="cancel"]').click()
}
if(document.querySelector('button.layerConfirm')) {
document.querySelector('button.layerConfirm').click()
} else {
document.querySelector('[aria-label="Member Settings"]').click()
setTimeout(function() {
if (document.querySelector('.uiContextualLayerPositioner.uiLayer:not(.hidden_elem) [data-testid="leave_group"]').textContent.toLocaleLowerCase() == "remove from group") {
document.querySelector('.uiContextualLayerPositioner.uiLayer:not(.hidden_elem) [data-testid="leave_group"]').click()
setTimeout(function() {
document.querySelectorAll('[role="dialog"] input[type="checkbox"]').forEach(function(el) {el.click()})
document.querySelector('button.layerConfirm').click()
}, 1000)
} else {
document.querySelector('[data-name="GroupProfileGridItem"]').remove()
}
}, 500)
}
}, 3000)
Pro tip: Run in multiple tabs to speed up deletion.