Skip to content

Instantly share code, notes, and snippets.

@ashumkin
Last active August 4, 2024 14:30
Show Gist options
  • Select an option

  • Save ashumkin/fb64bb786af7dbee4fc3a0d4a9884f85 to your computer and use it in GitHub Desktop.

Select an option

Save ashumkin/fb64bb786af7dbee4fc3a0d4a9884f85 to your computer and use it in GitHub Desktop.
clear yandex music playlist
// source https://yandexmusic.userecho.com/communities/45/topics/939-polnaya-ochistka-plejlista-mne-nravitsya
let deletAllTrack = function() {
let b = null;
$.each($('.d-track__delete[data-b]'), function(index, value){
if ( b == null ) {
b = $(value).data('b');
$('button[data-b=' + b + ']').trigger('click');
}
});
setTimeout(function(){
if ( $('.d-track__delete[data-b]').length > 0 ) {
deletAllTrack();
}
}, 1000);
}
deletAllTrack();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment