Skip to content

Instantly share code, notes, and snippets.

View vadykoo's full-sized avatar

Vadym vadykoo

View GitHub Profile
@vadykoo
vadykoo / twitter-remove-retweets.js
Created July 28, 2024 16:39 — forked from antlionguard/twitter-remove-retweets.js
With this script, you can remove all retweets you are retweeted on Twitter.
const timer = ms => new Promise(res => setTimeout(res, ms));
// Unretweet normally
const unretweetTweet = async (tweet) => {
const unretweetButton = tweet.querySelector('[data-testid="unretweet"]');
if (unretweetButton) {
await unretweetButton.click();
await timer(250);
const unretweetConfirmButton = document.querySelector('[data-testid="unretweetConfirm"]');
if (unretweetConfirmButton) {