I had several thousand (?) accounts blocked because of twitter advertising.
Thanks to this I could no longer tell whether or not twitter “bugs” were blocking people without my consent. So I decided to unblock most of the accounts (most of them companies). The problem though, is this was taking forever to do manually. So I came up with a way to do it automatically (for the most part).
Step 1 — Grab the block list
Go here: https://twitter.com/settings/blocked/all
Then right-click and inspect an element in the block list.
In Brave’s HTML inspector, right-click on the very first element just above the list of <div></div> elements, the one that represents the <div> containing the list:
Select "Store as global variable" from the menu.
This should bring up the console and store the list in a temp1 variable.
Step 2 — Create the unblock function
Paste the following into the console to create unblockFn and press enter:
var unblockFn = function () {
Array.from(temp1.children).forEach((e) => {
let button = e.querySelector('[aria-label="Blocked"]');
if (button) {
button.click()
}
})
}
UPDATE August 6th: I’ve updated the code to be more resilient to changes by twitter! It will not match the old code shown in the screenshots below.
This code will need slight adjustments if twitter updates this page, but the idea will remain the same.
Step 3 — Run the unblock function while scrolling the page
Type unblockFn() and hit Enter.
Everything you see should be unblocked.
If you have a huge block list, you will need to scroll a bit and then run the function again. Scroll some more, run it again. Repeat until all accounts are unblocked.
Then you can re-block whatever accounts you want.


