How to unblock all blocked twitter account easily

If you spend a lot of time on twitter, and acounts you blocked in the past seem irrelevant now, unblocking them makes the most sense. Unfortunately, Twitter doesn’t make it easy to do. you can remove all your blocked account manually one by one, but it will takes a lot of times and i am sure you wont be happy to do it.

NOTE:

This tutor works on english version of twitter layout because this script search "Blocked" button,

the extension may not work in the future if twitter changes their layout, in this case, you should subscribe my channel to get an update for the new script.

my youtube channel :

https://www.youtube.com/channel/UCqRqvw9n7Lrh79x3dRDOkDg


An easy way to do this is with the help of a chrome extension. here's a simple way to do it.

You only have to create 2 files, manifest.json and unblock.js

1. manifest.json

copy the code below and paste it in to your manifest.json file:

{

 "manifest_version": 2,

 "name": "Twitter Unblocker - FreeAngel",

 "description": "This extension will unblock all blocked twitter accounts",

 "version": "1.0",

"content_scripts": [

 {

 "matches": ["https://twitter.com/*"],

 "js": ["unblock.js"]

 }

 ]

} 

This is just a metadata file in JSON format that contains properties like your extension’s name, description, version number and so on. Every extension needs to have a JSON-formatted manifest file.


2. unblock.js

copy the code below and paste it in to your unblock.js file:

/*

Simple script to unblock all twitter blocked account

(c) FreeAngel - 2021

https://www.youtube.com/channel/UCqRqvw9n7Lrh79x3dRDOkDg

*/

const interval = 5000;

const wait_delay = 10;

const reload_after_unsub = 20;

const twitter_blocked_page = 'https://twitter.com/settings/blocked/all';


cur_tick = 0;

buttons = null;

btn_idx = 0;

no_subs = false;


    

   var readyStateCheckInterval = setInterval(function() {


   if (document.readyState === "complete") {


    cur_tick += interval/1000;

DoJob();

console.log("timer ...");


   }

}, interval);

function DoJob(){

if(cur_tick < wait_delay ) { console.log("waiting delay (10s) : "+cur_tick); return; }

if(no_subs) { 

if (cur_tick >= 30) { console.log("reloading page ..."); window.location = twitter_blocked_page; }

return; 

}


var cur_url = window.location.href;

if(cur_url != twitter_blocked_page) { return; }

if(!buttons){

console.log("Get all unblock buttons");

buttons = document.querySelectorAll('[role="button"]');

console.log("Got Btn : "+buttons.length);

btn_idx = 0;

}


var btn;

var lbl;


if (!buttons.length) { console.log('There are no blocked account left ..'); no_subs = true; return; }

var i = 0;

for(i = 0; i < buttons.length; i++){

btn = buttons[i];

lbl = btn.getAttribute('aria-label');

if(lbl == null) { continue; }

if(lbl.indexOf("Blocked") == -1) { continue; }

console.log(lbl);

btn_idx += 1;

btn.click();

break;

}


if (btn_idx < 1) { console.log('There are button found ..'); no_subs = true; return; }

if ((btn_idx >= reload_after_unsub) || (i >= buttons.length-1)) {

window.location = twitter_blocked_page;

return;

}


}

put those two files into a directory, name the directory anything you want.

you can also download the complete files here :

https://drive.google.com/file/d/1vj6Tv2ToW_o7iltFNjQl32xeG2vxKt7a/view?usp=sharing


CONNECT TO CHROME

Now we need to ..load the extension!

  1. Go to chrome://extensions in your browser
  2. Ensure that the Developer mode checkbox in the top right-hand 
  3. Click Load unpacked extension to pop up a file-selection dialog & select your directory.
  4. If the extension is valid, it’ll be loaded up and active right away! If it’s invalid, an error message will be displayed at the top of the page. Correct the error, and try again.
  5. Ensure that the enabled box next to your chrome extension is checked so you can see it in action.
  6. Now you can go to : https://twitter.com/settings/blocked/all, make sure you've logged in, reload the page if nothing happen.
  7. Just Wait until it started to work
the script will wait for 10 seconds every time page reloaded before execute with 5 seconds delay on every unmute action.

every 20 unblocked account, the script will try to reload the page, you can change the value for "const reload_after_unsub" with any value you want.

*IMPORTANT: Make sure to click reload after every change you make so you can see it in action →

youtube video





Post a Comment