Skip to content

Instantly share code, notes, and snippets.

@palant
Created November 8, 2019 08:39
Show Gist options
  • Save palant/38dc0145b4a9092ca909251cccdcae3d to your computer and use it in GitHub Desktop.
Save palant/38dc0145b4a9092ca909251cccdcae3d to your computer and use it in GitHub Desktop.
Like a Twitter thread
(function()
{
const selector = `
.tweet.ancestor,
.tweet.js-original-tweet,
.ThreadedConversation--selfThread .tweet.descendant
`;
for (let tweet of document.querySelectorAll(selector))
{
if (!tweet.classList.contains("favorited"))
tweet.querySelector(".ProfileTweet-actionButton.js-actionFavorite").click();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment