Skip to content

Instantly share code, notes, and snippets.

View akash-ooo's full-sized avatar

Akash akash-ooo

View GitHub Profile
@akash-ooo
akash-ooo / gist:e162449afe03591f674d93cc06471a0f
Created June 16, 2025 20:42
This JavaScript script automates the process of unfollowing users on social media platforms like Facebook by targeting the “three-dot” menu buttons inside the unfollow list container. It sequentially clicks each three-dot menu, waits for the AJAX-loaded menu to appear, then clicks the visible “Unfollow” button, mimicking human-like delays for na…
const delay = ms => new Promise(res => setTimeout(res, ms));
// Selectors at the top for easy modification
const unfollowListContainerSelector = '.x78zum5.x1q0g3np.x1a02dak.x1qughib'; // Container holding the 3-dot buttons
const threeDotSelector = '.x1b0d499.xep6ejk'; // The 3-dot menu button selector
const unfollowText = 'unfollow'; // The text of the unfollow button in the menu
/**
* Smoothly scrolls the page down by a specified distance in small steps.
* Resolves when bottom of the page is reached.