- Go to your profile on instagram.com (sign in if not already)
- Click on
XXX followingfor the popup with the users you're following to appear - Open Chrome Devtools and Paste the following into the Console and hit return:
(async function(){
const UNFOLLOW_LIMIT = 800
const delay = (ms) => new Promise(_ => setTimeout(_, ms))
const findButton = (txt) => [...document.querySelectorAll("button").entries()].map(([pos, btn]) => btn).filter(btn => btn.innerHTML === txt)[0]
console.log("Start")
for (let i = 0; i < UNFOLLOW_LIMIT; i++) {
const $next = findButton("Following")
if (!$next) { continue }
$next.scrollIntoViewIfNeeded()
$next.click()
await delay(100)
$confirm = findButton("Unfollow")
if ($confirm) {
$confirm.click()
}
await delay(20 * 1000) // Wait 20s, 200 unfollows per hour limit
console.log(`Unfollowed #${i}`)
}
console.log("The end")
})()
This script made with ai and tested by me works very fine!!
(async function() {
var UNFOLLOW_LIMIT = 800;
var DELAY_BETWEEN_ACTIONS = 2000;
var DELAY_AFTER_CLICK = 300;
var MAX_RETRIES = 3;
var isRunning = true;
function delay(ms) {
return new Promise(function(resolve) {
setTimeout(resolve, ms);
});
}
function findButton(txt, root) {
if (!root) root = document;
var buttons = root.querySelectorAll("button");
for (var i = 0; i < buttons.length; i++) {
var btnText = buttons[i].textContent.trim().toLowerCase();
if (btnText.indexOf(txt.toLowerCase()) !== -1) {
return buttons[i];
}
}
return null;
}
function randomDelay(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Creer le bouton STOP
var stopButton = document.createElement("div");
stopButton.id = "unfollowStopBtn";
stopButton.innerHTML = "⏹ ARRETER
Unfollows: 0";
stopButton.style.cssText = "position:fixed;top:20px;right:20px;z-index:999999;background:#ff4444;color:white;padding:15px 25px;border-radius:10px;cursor:pointer;font-family:Arial;font-size:16px;font-weight:bold;box-shadow:0 4px 15px rgba(0,0,0,0.3);text-align:center;transition:all 0.3s;";
stopButton.onmouseover = function() {
this.style.background = "#cc0000";
this.style.transform = "scale(1.05)";
};
stopButton.onmouseout = function() {
this.style.background = "#ff4444";
this.style.transform = "scale(1)";
};
stopButton.onclick = function() {
isRunning = false;
this.innerHTML = "✓ ARRETE";
this.style.background = "#666";
this.style.cursor = "default";
this.onclick = null;
console.log("Script arrete par l'utilisateur");
};
document.body.appendChild(stopButton);
console.log("Demarrage du script Instagram Unfollow");
console.log("Limite: " + UNFOLLOW_LIMIT + " comptes");
console.log("Delai entre actions: " + DELAY_BETWEEN_ACTIONS + "ms");
console.log("--------------------------------------------------");
console.log("CONSEIL: Cliquez sur le bouton rouge en haut a droite pour arreter");
var successCount = 0;
var failCount = 0;
for (var i = 0; i < UNFOLLOW_LIMIT; i++) {
if (!isRunning) {
console.log("Script arrete manuellement");
break;
}
}
console.log("--------------------------------------------------");
console.log("Script termine !");
console.log("Succes: " + successCount);
console.log("Echecs: " + failCount);
console.log("Total traite: " + (successCount + failCount));
console.log("--------------------------------------------------");
// Retirer le bouton apres la fin
setTimeout(function() {
var btn = document.getElementById("unfollowStopBtn");
if (btn) {
btn.style.opacity = "0";
setTimeout(function() {
if (btn.parentNode) {
btn.parentNode.removeChild(btn);
}
}, 500);
}
}, 3000);
})();