In this article I will show you how to automatically unfriend all friends, at once and without installing any plugin.
If the stated in the above picture does not annoy you, you probably do not need to read this article, and the other related ones.
Otherwise, whatever the reason could be, in this way you will have the quietest account ever.
Free your mind from the clutter. Offline life is better.
Disclaimers
Disclaimer: It is needed a simple and short script which you should want to understand before running it, because it has the power to mess up with your Facebook account.
Disclaimer: Follow the steps at your own risk. I am not responsible for what your are doing. Are you?
Getting Started
There are three simple steps in between you and the clarity of your Facebook account. There is a short script involved, which you will copy and paste into the console of the Developer tools of your browser (Firefox, Chrome) while navigating into the Facebook Friends page.
In Short, what you will be doing:
- Get the script.
- Go to the Facebook Friends page.
- Run the script within the browser.
1. Get the script
Copy in your clipboard the code of the most recent version of the script from github, or try your luck with this one:
var pleaseUnfriendAllPlease = function () {
var done = [];
var clickElement = function(elem) {
elem.style.border = "thick solid red";
elem.click();
}
var unfriendFriend = function(idx) {
// unfriend
[...document.querySelectorAll('a[role="menuitem"][ajaxify*="removefriendconfirm"]')].forEach( (a) => {
if (done.includes(a.attributes["ajaxify"].value) === false) {
done.push(a.attributes["ajaxify"].value);
clickElement(a);
console.log('unfriended...');
}
});
setTimeout(unfriend, 2000);
}
var unfriend = function() {
// button
var elem = [...document.querySelectorAll('ul[class~="uiList"] a[role="button"][class~="friendButton"]')][0];
if (elem) {
if (done.includes(elem.attributes["data-profileid"].value) === false) {
done.push(elem.attributes["data-profileid"].value);
clickElement(elem);
} else {
elem.parentNode.removeChild(elem);
}
setTimeout(unfriendFriend, 500);
} else {
clearTimeout();
console.log('DONE. Now enroll for a potter workshop and make friends there.');
}
};
unfriend();
}
2. Go to the Facebook Messenger
- Go to the Facebook Friends page:
https://www.facebook.com/<here_your_fb_id>/friends
- Scroll all the way down until the last friend is shown in the thumbnail.
3. Run the script within the browser
- Press
F12
to open the Developer tools window (Firefox, Chrome). - Select Console.
- Read the security concerns message that the Facebook developers left for you.
- Paste the script into the prompt of the console
- Type
pleaseUnfriendAllPlease()
, hit return, and wait until it’s done.
If this article was useful to you, please share it using your favorite way for doing it! If you have suggestions of improvement or you’ve found something wrong, please let me know!