Skip to content

Instantly share code, notes, and snippets.

@viveret
Created September 10, 2023 15:01
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 viveret/dcfd53b9df8dd9d3327d8e91bfd632c2 to your computer and use it in GitHub Desktop.
Save viveret/dcfd53b9df8dd9d3327d8e91bfd632c2 to your computer and use it in GitHub Desktop.
Tweet Delete Script
document.querySelectorAll('div/div/div/div/main/div/div/div/div/div/div/div/div/section/div/div/div/div/div/article/div/div/div/div/div/div/div/div/div/div/div/div/div/div/svg'.replaceAll('/', ' > ')).forEach((x, i) => x.closest('div').click())
setTimeout(() => {
testxpath = document.evaluate("//span[text()='Delete']", document, null, XPathResult.ANY_TYPE, null );
let nodes = []; let node; while (node = testxpath.iterateNext()) {nodes.push(node);}
nodes.forEach((x) => x.click());
setTimeout(() => {
testxpath = document.evaluate('/html/body/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div/span/span[text()="Delete"]', document, null, XPathResult.ANY_TYPE, null);
nodes = []; let node; while (node = testxpath.iterateNext()) {nodes.push(node);}
nodes.forEach((x) => x.click());
}, 2000);
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment