Created
April 22, 2023 21:13
-
-
Save chadlavi/2fd3e8fc7383ecf55eebe04649e9e955 to your computer and use it in GitHub Desktop.
This file contains 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
// get all the three-dot menus that are within tweets | |
document.querySelectorAll("article [aria-label=More]") | |
// for each three-dot menu... | |
.forEach(m => { | |
// click to open the menu | |
m.click(); | |
// then find and click on the block item in the menu | |
document.querySelector("[role=menu] [data-testid=block]").click(); | |
// then find and click on the confirmation button in the modal | |
document.querySelector("[role=button][data-testid=confirmationSheetConfirm]").click(); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can paste this into the console in dev tools to block the authors of all the tweets that are currently visible. Like say on a search results page on twitter, for example this one https://twitter.com/search?q=%22pay%20the%20%248%22%20filter%3Ablue_verified