- Sign in to Twitter
- Go to your Profile
- Open DevTools and go to the 'Console' tab
- Copy and paste the following script
async function main() {
let sleep = ms => new Promise(r => setTimeout(r, ms))
while (true) {
let tweet = document
.querySelector(`[data-testid="tweet"] [data-testid="UserAvatar-Container-iamandrewluca"]`)
?.closest(`[data-testid="tweet"]`)
if (!tweet) {
window.scrollTo(0, document.body.scrollHeight || document.documentElement.scrollHeight);
await sleep(2000);
continue;
};
tweet.scrollIntoView();
let more = tweet.querySelector(`[aria-label="More"]`)
more.click();
await sleep(500);
document.querySelector('[data-testid="Dropdown"] > div').click()
await sleep(500);
document.querySelector('[data-testid="confirmationSheetConfirm"]').click()
console.log('Done')
await sleep(4000)
}
}
main()
- Sign in to Twitter
- Go to your Profile
- Open DevTools and go to the 'Console' tab
- Copy and paste the following script
async function main() {
let sleep = ms => new Promise(r => setTimeout(r, ms))
while (true) {
let elem = document.querySelector('[data-testid="unretweet"]')
if (!elem) {
window.scrollTo(0, document.body.scrollHeight || document.documentElement.scrollHeight);
await sleep(2000);
continue;
};
elem.closest('[data-testid="tweet"]').scrollIntoView();
elem.click()
await sleep(500);
document.querySelector('[data-testid="unretweetConfirm"]').click();
console.log('Done');
await sleep(500);
}
}
main()
- Sign in to Twitter
- Go to your Profile
- Go the Likes section
- Open DevTools and go to the 'Console' tab
- Copy and paste the following script
async function main() {
let sleep = ms => new Promise(r => setTimeout(r, ms))
while (true) {
let heart = document.querySelector('[data-testid="unlike"]')
if (!heart) return;
heart.closest('[data-testid="tweet"]').scrollIntoView();
heart.click();
console.log('Unlike')
await sleep(3000);
}
}
main()