Skip to content

Instantly share code, notes, and snippets.

@themarcba
Last active January 5, 2024 10:19
Show Gist options
  • Save themarcba/9bd91cc2a8fe67e05f8d46b5796f6f41 to your computer and use it in GitHub Desktop.
Save themarcba/9bd91cc2a8fe67e05f8d46b5796f6f41 to your computer and use it in GitHub Desktop.
Accept all requests on an 𝕏 community
const acceptInterval = setInterval(() => {
const acceptButtons = Array.from(document.querySelectorAll("[role=button]")).filter(
(button) => button.textContent === "Approve"
);
if (acceptButtons.length > 0) {
acceptButtons.forEach((b) => b.click());
window.scrollBy(0, window.innerHeight - 100);
} else {
clearInterval(acceptInterval);
}
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment