Skip to content

Instantly share code, notes, and snippets.

Last active August 27, 2019 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
function delay(n) {
return new Promise(accept => setTimeout(() => accept(), n));
async function cleanUp() {
let xs = Array.from(document.querySelectorAll('[aria-label=Edit]')).slice(0, 10);
xs.forEach(n =>;
await delay(1000);
let ys = document.querySelectorAll('[rel=async-post][ajaxify^="/ajax/timeline/delete/confirm"]');
ys.forEach(n =>;
await delay(5000);
for (let n of document.querySelectorAll('form[action^="/ajax/timeline/delete"] [type=submit]')) {;
await delay(500);
for (let x of xs) {
document.querySelectorAll('.uiLayer').forEach(n => n.remove());
window.scrollTo(0, document.body.scrollHeight);
await delay(1000);
let loader = document.querySelector('[ajaxify^="/ajax/timeline/all_activity/scroll.php"]');
if (loader);
await delay(1000);
await cleanUp();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment