Skip to content

MrMikeAde/twitter-unfollow-2026

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Twitter/X Auto Unfollow Script

JavaScript Automation Maintenance

A lightweight browser console automation tool that helps automate unfollowing accounts from your Twitter/X following list.

The script interacts directly with the page DOM, identifies "Following" buttons, triggers the Unfollow confirmation, and scrolls through the list to process multiple accounts automatically.

This project demonstrates practical concepts in browser automation, DOM manipulation, and asynchronous JavaScript control flow.


Features

• Automated unfollow process • Human-like randomized delays • Scroll automation for loading additional accounts • ESC key emergency stop • Configurable automation parameters • Clean and modular JavaScript structure


How It Works

The script performs the following sequence:

  1. Searches the page for "Following" buttons
  2. Clicks the Following button
  3. Waits briefly using randomized delays
  4. Clicks the Unfollow confirmation
  5. Scrolls periodically to load more accounts
  6. Repeats the process until the limit is reached

The implementation relies on DOM queries and text pattern matching to identify actionable elements.


Usage

Step 1

Open Twitter/X and navigate to your following list:

https://twitter.com/yourusername/following

or

https://x.com/yourusername/following

Step 2

Open Developer Tools

F12 → Console

Step 3

Paste the contents of:

script.js

into the console.


Step 4

Run the automation:

autoUnfollow()

Configuration Options

Example configuration:

autoUnfollow({
  maxActions: 500,
  scrollEvery: 15,
  delayFollowMin: 400,
  delayFollowMax: 900,
  delayUnfollowMin: 800,
  delayUnfollowMax: 1400
})

Parameters

Parameter Description
maxActions Maximum unfollow attempts
scrollEvery Scroll interval for loading more accounts
delayFollowMin Minimum delay before confirmation
delayFollowMax Maximum delay before confirmation
delayUnfollowMin Minimum delay after unfollow
delayUnfollowMax Maximum delay after unfollow

Stopping the Script

Press:

ESC

at any time to immediately stop the automation.


Project Structure

twitter-auto-unfollow/
│
├── script.js
├── README.md
├── demo.gif
└── LICENSE

Important Notes

Automation may violate Twitter/X Terms of Service.

Use responsibly and avoid:

• Extremely high unfollow rates • Running automation continuously for extended periods • Triggering automated behavior detection

Recommended limit:

200 – 400 unfollows per session

Educational Purpose

This repository demonstrates:

• DOM manipulation • Regex-based text matching • Async/await automation loops • Human-like randomized timing • Browser console scripting


License

MIT License

You are free to use, modify, and distribute this project.


Author

GitHub: MrMikeAde

About

Twitter/X Auto Unfollow Script – A browser console automation tool that helps automate unfollowing accounts from your following list using DOM interaction, async control flow, and randomized delays to mimic human behavior.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors