Created
May 29, 2018 14:39
-
-
Save CaiJimmy/6959d4d272ac0d1b69f9682713082911 to your computer and use it in GitHub Desktop.
Delete Liked Tweets
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
function click(){ | |
return new Promise(resolve=>{ | |
[...document.querySelectorAll('.js-stream-item.stream-item')].forEach(container => { | |
container.querySelector('.ProfileTweet-action--unfavorite').click(); | |
container.remove(); | |
}); | |
resolve(); | |
}) | |
}; | |
function unlike(){ | |
click().then(()=>{ | |
window.scrollTo(0,document.body.scrollHeight); | |
setTimeout(()=>{ | |
unlike(); | |
}, 10000); | |
}); | |
} | |
unlike(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment