Загрузка...

[JS] Delete all posts in VK.

Thread in Frontend created by hikariatama Jan 7, 2021. 297 views

  1. hikariatama
    hikariatama Topic starter Jan 7, 2021 me.hikariatama.ru 103 Apr 5, 2020
    Скрипт для удаления всех постов с личного акка ВК.

    [IMG]

    [IMG]
    var delete_elements = document.querySelectorAll("._post_content .ui_actions_menu._ui_menu a:nth-child(1)");
    var num_of_saves = delete_elements.length;
    var delay = 1000;
    var counter = 1;
    var delete_element, delete_backup;
    Element.prototype.remove = function() {
    this.parentElement.removeChild(this);
    }

    function delete_all_posts() {
    for(var i = 0; i < num_of_saves; i++) {
    setTimeout(function(){
    delete_element = document.querySelector("._post_content .ui_actions_menu._ui_menu a:nth-child(1)");
    delete_element.click();
    delete_backup = document.querySelector("#page_wall_posts div");
    delete_backup.remove();
    document.querySelector('.dan_script_progress').value = counter++;
    if(counter - 1 == num_of_saves) {
    document.querySelector("#wall_more_link").remove();
    document.querySelector('.dan_script_remove_label').innerHTML = "Работа завершена. Не забудь про +rep <3";
    setTimeout(() => {
    window.location.reload();
    }, 1500);
    }
    }, i * delay);
    }
    }

    document.body.innerHTML = '<div class="dan_script_wrapper" style="width: 100%; height: 100%; margin: 0; padding: 0;position: fixed; top: 0;bottom: 0;left:0;right:0;z-index:150;background: rgba(0, 0, 0, .5);"><div class="dan_script_popup" style="width: 500px; height: 230px;top:0;right:0;bottom:0;left:0;margin-top:calc(50vh - 115px);margin-left:calc(50vw - 250px);padding:15px;border-radius: 15px;background:#fefefe"><br><h1 style="text-align: center;font-weight: 100;font-family:Roboto;font-size: 22px;margin:0;">VK Wall Cleaner</h1><h2 style="font-size:16px;color:#dedede; text-align: center;font-family:Roboto;margin:0;">By @innocoffee</h2><br><h2 style="font-size:16px;text-align: center;font-family:Roboto;margin:0;" class="dan_script_remove_label">Начать удаление ' + num_of_saves.toString() + ' постов(-а)?</h2><br><input type="text" class="dan_script_confirm_input" placeholder="Введите УДАЛИТЬ, чтобы продолжить" style="font-family: Roboto;width: calc(90% - 30px);border-radius:15px; margin-left: 5%;border: none;padding:15px;background:#eee;font-size:18px;text-align:center;"></div></div>' + document.body.innerHTML;

    document.querySelector('.dan_script_confirm_input').oninput = () => {
    if (document.querySelector('.dan_script_confirm_input').value !== "УДАЛИТЬ") return;
    document.querySelector('.dan_script_remove_label').innerHTML = "Работаем...";
    document.querySelector('.dan_script_confirm_input').remove();
    document.querySelector('.dan_script_popup').innerHTML += '<progress style="border: none;width:90%;margin-left:5%;height:32px;border-radius:30px;" class="dan_script_progress" value="0" max="' + num_of_saves + '"></progress>';
    delete_all_posts();
    }
    var delete_element,delete_backup,delete_elements=document.querySelectorAll("._post_content .ui_actions_menu._ui_menu a:nth-child(1)"),num_of_saves=delete_elements.length,delay=1e3,counter=1;function delete_all_posts(){for(var e=0;e<num_of_saves;e++)setTimeout(function(){(delete_element=document.querySelector("._post_content .ui_actions_menu._ui_menu a:nth-child(1)")).click(),(delete_backup=document.querySelector("#page_wall_posts div")).remove(),document.querySelector(".dan_script_progress").value=counter++,counter-1==num_of_saves&&(document.querySelector("#wall_more_link").remove(),document.querySelector(".dan_script_remove_label").innerHTML="Работа завершена. Не забудь про +rep <3",setTimeout(function(){window.location.reload()},1500))},e*delay)}Element.prototype.remove=function(){this.parentElement.removeChild(this)},document.body.innerHTML='<div class="dan_script_wrapper" style="width: 100%; height: 100%; margin: 0; padding: 0;position: fixed; top: 0;bottom: 0;left:0;right:0;z-index:150;background: rgba(0, 0, 0, .5);"><div class="dan_script_popup" style="width: 500px; height: 230px;top:0;right:0;bottom:0;left:0;margin-top:calc(50vh - 115px);margin-left:calc(50vw - 250px);padding:15px;border-radius: 15px;background:#fefefe"><br><h1 style="text-align: center;font-weight: 100;font-family:Roboto;font-size: 22px;margin:0;">VK Wall Cleaner</h1><h2 style="font-size:16px;color:#dedede; text-align: center;font-family:Roboto;margin:0;">By @innocoffee</h2><br><h2 style="font-size:16px;text-align: center;font-family:Roboto;margin:0;" class="dan_script_remove_label">Начать удаление '+num_of_saves.toString()+' постов(-а)?</h2><br><input type="text" class="dan_script_confirm_input" placeholder="Введите УДАЛИТЬ, чтобы продолжить" style="font-family: Roboto;width: calc(90% - 30px);border-radius:15px; margin-left: 5%;border: none;padding:15px;background:#eee;font-size:18px;text-align:center;"></div></div>'+document.body.innerHTML,document.querySelector(".dan_script_confirm_input").oninput=function(){"УДАЛИТЬ"===document.querySelector(".dan_script_confirm_input").value&&(document.querySelector(".dan_script_remove_label").innerHTML="Работаем...",document.querySelector(".dan_script_confirm_input").remove(),document.querySelector(".dan_script_popup").innerHTML+='<progress style="border: none;width:90%;margin-left:5%;height:32px;border-radius:30px;" class="dan_script_progress" value="0" max="'+num_of_saves+'"></progress>',delete_all_posts())};

    Вставлять в обычную JS консоль (F12)

    Если скрипт помог, не забывайте про :froglove:
    Тема для критики и предложений\пожеланий\замечаний :cool_bun:
     
  2. Минато
    Минато Jan 7, 2021 Banned 755 Nov 21, 2020
    а нахуя?
     
    1. hikariatama Topic starter
      Минато, а) Для людей, которые пользуются взаимо-накруткой; б) для тех, кому засрали стенку спамеры\друзья и т.д.; в) для тех, кому надоел свой собственный хлам на стене, и он хочет его очистить
  3. xssinj
    xssinj Jan 7, 2021 65 Feb 13, 2014
    Есть ли скрипт для удаление всех своих комментариев, которые когда то оставлял в группах?
     
    1. View previous comments (2)
    2. hikariatama Topic starter
      kristall0v, Впринципе можно попробовать перебрать все группы, в которых ты состоишь, смотрим все записи, получаем все комменты, ищем свои и удаляем. Но мне кажется вк пошлет нахрен, и ****** понадобится дохрена
  4. CharlieWinston
    CharlieWinston Jan 7, 2021 Banned 55 Nov 6, 2020
    Автору 5 лет. М-да.
     
    1. hikariatama Topic starter
      CharlieWinston, А что не так? Простой метод для тех, у кого не 100500 постов, без использования сложных API и т.д. Просто скриптик в консоли.
  5. Kash
    Kash Jan 7, 2021 Отвечаю только в лс форума, а в телеге - нет! 825 Mar 26, 2018
    Годно :flexing_cat: Правда минус этого скрипта - капча, если очень много записей
     
    1. hikariatama Topic starter
      Kash, Можно задержку увеличить, константа вначале скрипта вынесена. Если же записей очень дохрена - ******)
Loading...
Top