Skip to content

Instantly share code, notes, and snippets.

@devheedoo
Created April 11, 2021 20:59
Show Gist options
  • Save devheedoo/77a69e7a1bc169afd1f7c2ba3358c5ce to your computer and use it in GitHub Desktop.
Save devheedoo/77a69e7a1bc169afd1f7c2ba3358c5ce to your computer and use it in GitHub Desktop.
const likedVideoElements = document.querySelectorAll('ytd-playlist-video-renderer.ytd-playlist-video-list-renderer yt-icon.ytd-menu-renderer');
for (let i=0; i<likedVideoElements.length; i++) {
setTimeout(() => {
likedVideoElements[i].click();
setTimeout(() => { document.querySelectorAll('yt-formatted-string.ytd-menu-service-item-renderer')[3].click(); }, 200);
}, i * 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment