Skip to content

Instantly share code, notes, and snippets.

@krrskl
Created April 24, 2020 20:13
Show Gist options
  • 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();
@vsfedorenko
Copy link

/**
 * 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-901oao.r-daml9f.r-1qd0xha.r-a023e6.r-16dba41.r-ad9z0x.r-bcqeeo.r-qvutc0"
  ).click();
  setTimeout(() => {
    confirmDelete();
  }, 1500);
};

const confirmDelete = () => {
  _this(
    ".css-901oao.r-1awozwy.r-jwli3a.r-6koalj.r-18u37iz.r-16y2uox.r-1qd0xha.r-a023e6.r-b88u0q.r-1777fci.r-ad9z0x.r-dnmrzs.r-bcqeeo.r-q4m81j.r-qvutc0"
  ).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