Skip to content

Instantly share code, notes, and snippets.

@farzany
farzany / script.js
Last active May 7, 2025 05:30
Twitter (𝕏) Script: Unlike all liked Tweets
async function wait(count) {
const timeout = count % 50 === 0 ? 30000 : Math.random() * 1000 + 2000;
await new Promise(resolve => setTimeout(resolve, timeout));
}
async function unlikeAllTweets({ limit, deleteTweets=false }) {
let count = 0;
while (count < limit) {
const unlikeButton = document.querySelector('[data-testid="unlike"]');
if (!unlikeButton) break;