Skip to content

Instantly share code, notes, and snippets.

@andrusha
Last active August 22, 2023 13:16
Show Gist options
  • Save andrusha/4544966 to your computer and use it in GitHub Desktop.
Save andrusha/4544966 to your computer and use it in GitHub Desktop.
Remove all audio files from vkontakte profile (javascript console snippet). Удалить все аудиозаписи из профиля вконтакте.
var nodes = document.querySelectorAll(".audio_remove"), i = 0, inter = setInterval( function() { if (i == nodes.length) { clearInterval(inter);}; var evt = document.createEvent("MouseEvents"); evt.initMouseEvent("click", true, true, nodes[i], 0, 0, 0, 0, 0, false, false, false, false, 0, null); nodes[i].dispatchEvent(evt); i++; }, 350);
@palkx
Copy link

palkx commented May 21, 2017

This should be working now.

var nodes = document.querySelectorAll("._audio_act_delete"), i = 0, inter = setInterval( function() { if (i == nodes.length) { clearInterval(inter);}; var evObj = new Event('click'); nodes[i].dispatchEvent(evObj); i++; }, 100);

@alpacato
Copy link

alpacato commented Apr 22, 2018

Works for m.vk.com

let n = document.querySelectorAll('.audio_item');

n.forEach(e => {
  let a = e.getAttribute('data-id');
  audioplayer.del(a, event);
})

@limitedeternity
Copy link

Для тех, кто сюда пришел в 2к19.

Метод только для m.vk.com: https://gist.github.com/limitedeternity/233afef87abd3742d3b5952458c93ea6

@nikita-komissarov
Copy link

Для тех, кто сюда пришел в 2к19.

Метод только для m.vk.com: https://gist.github.com/limitedeternity/233afef87abd3742d3b5952458c93ea6

Рабочий вариант, спасибо

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment