Skip to content

Instantly share code, notes, and snippets.

@motebaya
Created October 23, 2025 20:12
Show Gist options
  • Select an option

  • Save motebaya/b251b1067c130ebe4df6dc53e6168b86 to your computer and use it in GitHub Desktop.

Select an option

Save motebaya/b251b1067c130ebe4df6dc53e6168b86 to your computer and use it in GitHub Desktop.
im tired to unfollow 8k+ users fesnuk
// bosss im tired as hell
(async () => {
var t = [...document.querySelectorAll('a[aria-hidden="true"][role="link"]')];
if (t.length !== 0) {
for (let [xx, x] of t.entries()) {
var tridot =
x.parentElement.parentElement.nextSibling.nextSibling.querySelector(
"i"
);
if (tridot) {
tridot.click();
await new Promise((r) => setTimeout(r, 2000));
// Unfollow
var f = [...document.querySelectorAll('span[dir="auto"]')].filter(
(i) => i.textContent === "Unfollow"
);
if (f.length > 0) {
f[0].parentElement.parentElement.parentElement.parentElement.click();
console.log(`[${xx}/${t.length}] Unfollowed -> ${x.href}`);
await new Promise((r) => setTimeout(r, 2000));
}
}
}
console.log("All is ok!!");
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment