JavaScript:批量删除旧Facebook组中的所有成员 [英] JavaScript: Remove all members from an old Facebook Group in bulk

查看:111
本文介绍了JavaScript:批量删除旧Facebook组中的所有成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个拥有数百年历史的Facebook集团的管理员,此团伙已被诈骗帐户(其中700个左右)所淹没.实际上,对于我来说,成员太多,无法按照Facebook的建议手动将其删除.

I am the admin of a several-years-old Facebook group that has since been overrun by scam accounts (700 or so of them). There are far too many members for me to, realistically, manually remove them - as Facebook recommends.

这是该群组的链接: https://www.facebook.com/groups/101697209943412

Here is the link to the group: https://www.facebook.com/groups/101697209943412

我了解到许多网站都提供JavaScript来批量删除成员;但是,我也了解到,大多数这些脚本都是有毒的,可以将您的页面控制权交给开发人员/其他人.

I understand that many websites offer JavaScript to perform member removal in bulk; however, I also understand that most of these scripts are toxic and can give control of your page to their developers/other people.

我以为我想向StackOverflow索要干净的代码,希望这里的社区比整个互联网具有更高的完整性.

I thought I'd ask StackOverflow for a clean batch of code, in hopes that the community here has more integrity than the internet at large.

推荐答案

尝试一下

var j = 4;
function kickAll() {
   document.getElementsByClassName("_55pe")[j].click();
   setTimeout(function() { document.getElementsByClassName("_54nh")[1].click(); }, 3500);
   setTimeout(function() { document.getElementsByClassName("_42ft _4jy0 layerConfirm uiOverlayButton _4jy3 _4jy1 selected _51sy")[0].click(); }, 6000);
   j++;
   setTimeout(function() { wait(); }, 10000);
}

function wait() {
   if(document.getElementsByClassName("_42ft _4jy0 layerConfirm uiOverlayButton _4jy3 _4jy1 selected _51sy")[0] == undefined) { kickAll(); }
   else { document.getElementsByClassName("_54nh")[1].click(); wait(); }
}

kickAll();

此外,在控制台中时,您可能会收到错误未定义文档",如果是这样,请检查左上角的下拉框是否设置为"<top frame>"

Also, when in the console you might get an error 'document is not defined', if so, check that the top-left dropdown box is set to '<top frame>'

这篇关于JavaScript:批量删除旧Facebook组中的所有成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆