Last active
December 8, 2023 18:22
-
-
Save phpenterprise/82950b841456304535b9518b8d1ebc24 to your computer and use it in GitHub Desktop.
Facebook Auto Approve Group Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); |
Hi
facebook group post approve
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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!