I've been reading that there was a time when there was a way to remove all likes and reactions through your Activity log using the console. It was solved by doing this:
Then to the section, in this case comments
And we paste the following code in the console of, in this case, Chrome
var options = {
year: '2018', // MIND THE YEAR
limit: 0 // use 1000 if you want to throttle it
};
function delete_hide_unlike(options) {
var rows = document.querySelectorAll('#facebook #year_' + options.year + ' ._42fu');
for (var k = rows.length - 1; k >= options.limit; k--) {
var row = rows[k];
var rowButton = row.click();
var editButtons = document.querySelectorAll('._54nh');
for (var j = editButtons.length - 1; j >= options.limit; j--) {
var editButton = editButtons[j];
if (!editButton) {
console.log('Nope!');
break;
}
if (editButton.textContent == 'Delete') {
editButton.click(); // COMMENT OUT IF YOU WANT TO TEST IT OUT WITHOUT ACTUALY DELETING
console.log("DELETED");
} else if (editButton.textContent == 'Hidden from timeline') {
editButton.click(); // COMMENT OUT IF YOU WANT TO TEST IT OUT WITHOUT ACTUALY DELETING
console.log("HIDDEN");
} else if (editButton.textContent == 'Unlike') {
editButton.click(); // COMMENT OUT IF YOU WANT TO TEST IT OUT WITHOUT ACTUALY DELETING
console.log("UNLIKED");
} else if (editButton.textContent == 'Remove reaction') {
editButton.click(); // COMMENT OUT IF YOU WANT TO TEST IT OUT WITHOUT ACTUALY DELETING
console.log("REACTION REMOVED");
} else {
console.log("IGNORED")
}
}
}
}
delete_hide_unlike(options);
After that, once you press enter, the following should come out:
But, in my case it just says:undefined
Does anyone have an idea how to fix it? It should be clarified that the images are for illustrative purposes, that is why var
I put 2018 in the code, since that is the year I chose in my Activity log
Two things:
If you change these two things, the script will work, in fact, I will execute it by deleting
editButton.click();
(so that I don't delete anything):Conclusion :