Skip to content

Instantly share code, notes, and snippets.

@keng42
Created March 21, 2020 07:13
Show Gist options
  • Save keng42/273b2316ce178b5ed83e65bb332f3f34 to your computer and use it in GitHub Desktop.
Save keng42/273b2316ce178b5ed83e65bb332f3f34 to your computer and use it in GitHub Desktop.
/**
* Unblock all twitter accounts
*
* https://twitter.com/settings/blocked/all
*
* created by keng42 @2020-03-21 15:11:52
*/
let plan = setInterval(() => {
let btns = document.evaluate('//span[text()="Blocked"]', document, null, XPathResult.ANY_TYPE, null );
let btn = btns.iterateNext();
if (!btn) {
clearInterval(plan);
return;
}
let y = btn.getBoundingClientRect().top + window.scrollY;
window.scroll({
top: y,
behavior: 'smooth'
});
btn.click();
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment