Skip to content

Instantly share code, notes, and snippets.

@phpenterprise
Last active December 8, 2023 18:22
Show Gist options
  • Select an option

  • Save phpenterprise/82950b841456304535b9518b8d1ebc24 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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
Copy Markdown

Hi

@anastttii
Copy link
Copy Markdown

facebook group post approve

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