Skip to content

Instantly share code, notes, and snippets.

@vanholler
Created August 5, 2024 08:38
Show Gist options
  • Save vanholler/f17a295167d7ec9a286c4e342cf4aa28 to your computer and use it in GitHub Desktop.
Save vanholler/f17a295167d7ec9a286c4e342cf4aa28 to your computer and use it in GitHub Desktop.
Удалить собачек vk (Вконтакте) из друзей или группы,паблика .js
let myImg = document.getElementsByTagName("img");
let ImgDeact = [];
for (let i = 0; i < myImg.length; i++) {
if (myImg[i].src.indexOf('https://sun2-19.userapi.com/TXX0AmdpJDc_KdMLdUkU8lgRGNUpUfhkRQT4eA/70U0FUKKdCE.png') != -1) {
ImgDeact.push(myImg[i]);
}
}
for (let i = 0; i < ImgDeact.length; i++) {
let myLink = ImgDeact[i].parentNode.parentNode.nextElementSibling.children;
myLink.item(0).click();
console.log("delete",i+1);
}
console.info("Всего удалено:",ImgDeact.length);
// для очистки друзей Вконтакте
let myImg = document.getElementsByTagName("img");
let ImgDeact = [];
for (let i = 0; i < myImg.length; i++) {
if (myImg[i].src.indexOf('deactivated_100.png') != -1) {
ImgDeact.push(myImg[i]);
}
}
for (let i = 0; i < ImgDeact.length; i++) {
let myLink = ImgDeact[i].parentNode.parentNode.nextElementSibling.lastElementChild.children;
myLink.item(3).click();
console.log("delete",i+1);
}
console.info("Всего удалено:",ImgDeact.length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment