Skip to content

Instantly share code, notes, and snippets.

@gen3vra
Created May 7, 2021 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gen3vra/1d566ea91937bac427e29db662667f71 to your computer and use it in GitHub Desktop.
Save gen3vra/1d566ea91937bac427e29db662667f71 to your computer and use it in GitHub Desktop.
A little script to clear Upwork's chat area messages automatedly. PASTE INTO YOUR BROWSER CONSOLE!
//A little function to clear Upwork's chat area messages automatedly.
//I had over 100 chats and needed something quick. You're free to re-use.
//The timeouts are actually necessary because of Upwork's site animations. Trying to click the stuff too fast doesn't work.
//PASTE INTO YOUR CONSOLE.
(function clearUpWorkChat(i, max) {
setTimeout(function () {
document.getElementsByClassName("air-icon-more-circle list-more-rooms")[0].click();
}, 5);
setTimeout(function () {
document.getElementsByClassName("popover-content break")[0].children[0].children[0].children[0].children[0].click();
if (i < max) {
i++;
setTimeout(function () {
clearUpWorkChat(i, max);
}, 1000);
}
}, 799);
})(0, 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment