Created
February 26, 2023 05:58
-
-
Save lucianodiisouza/f950c76a0def3c1a68b08b659b37087c to your computer and use it in GitHub Desktop.
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
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