Skip to content

Instantly share code, notes, and snippets.

@shreve
Created June 14, 2019 00:45
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 shreve/4a064b94086fb81093afcfb0a76ee8db to your computer and use it in GitHub Desktop.
Save shreve/4a064b94086fb81093afcfb0a76ee8db to your computer and use it in GitHub Desktop.
Easy Tweet Delete
let del = () => {
let links = [].slice.apply(document.querySelectorAll('.js-actionDelete button'));
let link = links.filter((el) => { return el.offsetHeight > 0 })[0];
console.log(link);
if (link) { link.click(); }
let el = document.querySelector('.delete-action');
if (el.offsetHeight > 0) { el.click(); }
}
setInterval(del, 300);
@shreve
Copy link
Author

shreve commented Jun 14, 2019

Run this then press the details expander to delete tweets with one click. This script automatically presses the context menu item and the deletion dialog button.

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