Skip to content

Instantly share code, notes, and snippets.

@crwilcox
Last active November 15, 2022 14:45
Show Gist options
  • Save crwilcox/f1f9a284e1f6806d12ea2bbaec6ccef7 to your computer and use it in GitHub Desktop.
Save crwilcox/f1f9a284e1f6806d12ea2bbaec6ccef7 to your computer and use it in GitHub Desktop.
in_my_dms_deleting_all_the_things.
// Open 'Messages', then go to developer tools console, paste this in, and watch it do all the work
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
while (true) {
// Click first conversation "three dots" for dropdown menu
document.querySelector('[data-testid=conversation] div:has(+svg)').click();
await sleep(100);
// Navigate to 4th item in list (delete conversation)
document.querySelector('[data-testid=Dropdown] [role=menuitem]:nth-child(4)').click()
await sleep(100);
// Find Leave Button
document.querySelector('[data-testid=confirmationSheetDialog] [role=button]').click()
}
// Will fail in the end when it can't find the props. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment