Skip to content

Instantly share code, notes, and snippets.

@lucianodiisouza
Created February 26, 2023 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucianodiisouza/f950c76a0def3c1a68b08b659b37087c to your computer and use it in GitHub Desktop.
Save lucianodiisouza/f950c76a0def3c1a68b08b659b37087c to your computer and use it in GitHub Desktop.
const addNewTweetButton = document.querySelector('[aria-label="Add Tweet"]');
const charCount = document.querySelector(
'[data-testid="dual-phase-countdown-circle"]'
);
console.log("Tweet bot started");
const addNewTweet = () => {
addNewTweetButton.click();
console.log("New tweet added");
};
const checkCharCount = () => {
if (charCount.textContent === "0") {
addNewTweet();
}
};
setInterval(checkCharCount, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment