Skip to content

Instantly share code, notes, and snippets.

@vsuharnikov
Created April 4, 2018 20:46
Show Gist options
  • Save vsuharnikov/ab608797a31e1b9788f8b4022b9ffec5 to your computer and use it in GitHub Desktop.
Save vsuharnikov/ab608797a31e1b9788f8b4022b9ffec5 to your computer and use it in GitHub Desktop.
Удалям данные в ВК

Удаляем посты на стене

$$('.ui_actions_menu_item')
  .filter(function (x) {
    var attr = x.getAttributeNode('onclick');
    if (attr == null) return false;
    return attr.value.indexOf('delete') > 0;
  })
  .forEach(function (x) {
    x.click();
  });

Удаляем лайки в https://vk.com/fave

var i = 0;
var xs = $$('.my_like');

function cancel() { 
  var interval = setInterval(function() { if (xs[i]) xs[i].click(); i += 1; if (i > xs.length || document.getElementsByClassName('recaptcha').length > 0) clearInterval(interval); }, 500);
}

cancel();

Удалям аудиозаписи при наведении мышкой

var clicked = []; setInterval(function() { document.querySelectorAll('[aria-label="Удалить аудиозапись"]').forEach(function(x) { if (clicked.indexOf(x) < 0) { x.click(); clicked.push(x); } }) }, 20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment