Skip to content

Instantly share code, notes, and snippets.

@phpenterprise
Last active December 8, 2023 18:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phpenterprise/82950b841456304535b9518b8d1ebc24 to your computer and use it in GitHub Desktop.
Save phpenterprise/82950b841456304535b9518b8d1ebc24 to your computer and use it in GitHub Desktop.
Facebook Auto Approve Group Posts
// config
var speed = 100;
var i = 0;
var count = 1;
// change to you language button label (e.g: approve, disapprove)
var buttonText = 'recusar';
var regex = new RegExp( buttonText,'ig' );
// read elements
var els = [].slice.call(document.querySelectorAll('a[ajaxify]'));
// the compile function
var compile = function(){
if(count === 5){
i = 0;
count = 1;
console.log('Find more..');
window.els = [].slice.call(document.querySelectorAll('a[ajaxify]'));
}
console.log('Start compile..');
setTimeout(function(){
console.log('Check element..');
if(typeof els[i] === 'object' && els[i].innerHTML.match(regex)){
els[i].click();
setTimeout(function(){
count++;
i++;
console.log('Call element: '+i)
compile();
},speed);
console.log(els[i].getAttribute('ajaxify'))
} else {
i++;
console.log('Next: '+i)
compile();
}
}, speed);
};
// inspect remove post confirm window
setInterval(function(){
var a = document.querySelectorAll('button[data-testid=delete_post_confirm_button][type="submit"]');
if(a.length && a[0]){
a[0].click();
window.scrollTo(0,document.body.scrollHeight);
}
}, speed);
// init
compile();
@phpenterprise
Copy link
Author

Hello developers.

For approval and bulk disapproval of Facebook posts.

Created by the need of more than 2,000 old posts. Removing them by hand would be a boring and tasteless tafefa.

PS: Do not forget to check your Facebook language and change it in the configuration.

Go there!

image

@Murad-rhm
Copy link

Hi

@anastttii
Copy link

facebook group post approve

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