Skip to content

Instantly share code, notes, and snippets.

@josephNg95
Last active October 21, 2020 01:42
Show Gist options
  • Save josephNg95/e07aa56da591633649ae7a738b57af73 to your computer and use it in GitHub Desktop.
Save josephNg95/e07aa56da591633649ae7a738b57af73 to your computer and use it in GitHub Desktop.
Block all member request to the facebook group
function blockAllRequestGroup() {
let reqList = document.querySelector('.uiList._4kg._4kt._6-h._6-j').children
for (let i = 0; i < reqList.length; i++) {
let arrowActionButton = reqList[i].querySelector('.uiPopover').children[0].click()
let popOverActions = document.querySelector('.uiContextualLayer.uiContextualLayerBelowRight')
popOverActions.querySelector('ul').lastChild.click()
console.log(`%c ${reqList[i].querySelector('a._z_3').innerText} %c is blocked `, 'background:#35495e ; padding: 5px; border-radius: 3px 0 0 3px; color: #fff', 'background:#41b883 ; padding: 5px; border-radius: 0 3px 3px 0; color: #fff')
}
}
@josephNg95
Copy link
Author

Screen Shot 2020-10-21 at 08 42 02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment