Created
March 21, 2020 07:13
-
-
Save keng42/273b2316ce178b5ed83e65bb332f3f34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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