Skip to content

Instantly share code, notes, and snippets.

@prostomarkeloff
Forked from limitedeternity/m.vk.audio.js
Created December 21, 2019 22:32
Show Gist options
  • Save prostomarkeloff/b5049749aca633456c3bd67232d63476 to your computer and use it in GitHub Desktop.
Save prostomarkeloff/b5049749aca633456c3bd67232d63476 to your computer and use it in GitHub Desktop.
Delete VK audio from profile
new Promise(resolve => {
var offset = -100;
let pageScroll = () => {
window.scrollBy(0, 50);
if (window.pageYOffset === offset) {
return resolve(true);
}
offset = window.pageYOffset;
setTimeout(pageScroll, 50);
};
pageScroll();
}).then(() => {
let n = document.querySelectorAll('.audio_item.ai_has_btn.audio_item');
n.forEach(e => {
let a = e.getAttribute('data-id');
window.audioplayer.del(a, event);
});
location.reload(true);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment