Skip to content

Instantly share code, notes, and snippets.

@krrskl
Created April 24, 2020 20:13
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 krrskl/136fe9d2d775b4ac8a26c6fb46d2b4cf to your computer and use it in GitHub Desktop.
Save krrskl/136fe9d2d775b4ac8a26c6fb46d2b4cf to your computer and use it in GitHub Desktop.
This code is for delete all the tweets of your profile
/**
* This code work in the https://mobile.twitter.com/YOUR_USERNAME/with_replies
*
*/
const _this = $;
const clickFirstElement = () => {
_this(
".css-18t94o4.css-1dbjc4n.r-1777fci.r-11cpok1.r-1ny4l3l.r-bztko3.r-lrvibr"
).click();
setTimeout(() => {
deleteElement();
}, 1000);
};
const deleteElement = () => {
_this(
".css-1dbjc4n.r-1loqt21.r-18u37iz.r-779j7e.r-23eiwj.r-o7ynqc.r-6416eg.r-13qz1uu"
).click();
setTimeout(() => {
confirmDelete();
}, 1500);
};
const confirmDelete = () => {
_this(
".css-18t94o4.css-1dbjc4n.r-1dgebii.r-42olwf.r-sdzlij.r-1phboty.r-rs99b7.r-16y2uox.r-1w2pmg.r-145lgeb.r-9u3a9d.r-1fneopy.r-o7ynqc.r-6416eg.r-lrvibr"
).click();
setTimeout(() => {
window.scrollBy(0, 300);
clickFirstElement();
}, 3000);
};
clickFirstElement();
@iMaz1n
Copy link

iMaz1n commented Mar 3, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment