Skip to content

Instantly share code, notes, and snippets.

@pradprat
Last active March 2, 2022 10:51
Show Gist options
  • Save pradprat/06cbf947cee00d1722a02d2f81e010dd to your computer and use it in GitHub Desktop.
Save pradprat/06cbf947cee00d1722a02d2f81e010dd to your computer and use it in GitHub Desktop.
go to https://twitter.com/messages. open console, and paste the code
setInterval(() => {
for (const d of document.querySelectorAll(
'div[data-testid="conversation"]'
)) {
d.click();
}
for (const d of document.querySelectorAll(
'a[aria-label="Conversation info"]'
)) {
d.click();
}
for (const d of document.querySelectorAll("span")) {
if (d.innerHTML === "Leave conversation") {
d.click();
}
}
for (const d of document.querySelectorAll("span")) {
if (d.innerHTML === "Leave") {
d.click();
}
}
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment