-
-
Save marcos635/f9609d57382562a2c1359ef5b352ef3d to your computer and use it in GitHub Desktop.
Delete FB group pending posts for admins
This file contains hidden or 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
| /** | |
| * Please use this file at your own risk. I don't provide the support for it. | |
| * Any suggestion or problem are welcomed to report here :) | |
| */ | |
| /** | |
| * Usage: | |
| * 1. Log-in as an group admin in the desktop | |
| * 2. Go to your group pending list like: https://www.facebook.com/groups/[group-id]/pending/ | |
| * 3. Insert the following code to your browser console. See the guide: https://developer.chrome.com/devtools/docs/console | |
| * | |
| * Note: | |
| * - This will delete all posts in your pending list, so please make sure you don't need them any more. | |
| */ | |
| function deleteButtons() { | |
| var recusar = document.querySelectorAll('.sx_67dd83'); | |
| recusar.forEach(btn => btn.click()); | |
| }; | |
| function confirmdelete() { | |
| //button 'Delete' to confirm delete this post | |
| var excluir = document.querySelectorAll('.layerConfirm'); | |
| excluir.forEach(btn => btn.click()); | |
| }; | |
| var interval_del = setInterval( deleteButtons, 8000); | |
| var interval_confirm = setInterval( confirmdelete, 3000); | |
| //automatically scroll down to the bottom of page - ref: http://bit.ly/1O4tvHd | |
| var interval_bottom_page = setInterval( function () { window.scrollTo(0,document.body.scrollHeight) }, 30000); ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment