how to mass unmute twitter accounts easily

If you spend a lot of time on twitter, and acounts you muted in the past seem irrelevant now, unmuting them makes the most sense. Unfortunately, Twitter doesn’t make it easy to do. you can remove all your muted 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 "Unmute ...." button

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 unmute.js

1. manifest.json

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

{

 "manifest_version": 2,

 "name": "Twitter Unmute  - FreeAngel",

 "description": "This extension will unmute all muted twitter account",

 "version": "1.0",

"content_scripts": [

 {

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

 "js": ["unmute.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. unmute.js

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

/*

(c) FreeAngel - 2021

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

*/

const interval = 5000;

const wait_delay = 10;

const reload_after_unsub = 20;

const twitter_muted_page = 'https://twitter.com/settings/muted/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 (15s) : "+cur_tick); return; }

if(no_subs) { 

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

return; 

}

var cur_url = window.location.href;

if(cur_url != twitter_muted_page) { return; }

if(!buttons){

console.log("Get all unmute 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 muted 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("Unmute") == -1) { continue; }

console.log(lbl);

btn_idx += 1;

btn.click();

break;

}


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

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

window.location = twitter_muted_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/1sl2EAfBWckiMWyBS6G0p6mdATH_s1Zxp/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/muted/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 unmutes, 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