Created
September 25, 2021 10:28
-
-
Save steshaw/5481a2656c4c8fcfa274dda0c379c653 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function deleteLiked() { | |
var menus = $('body').getElementsByClassName("dropdown-trigger") | |
for (var i = 0; i < menus.length; i++) { | |
if (i >= 2) { | |
var menu = menus[i]; | |
menu.children[0].click(); | |
const timeout = setTimeout(() => { | |
$('body').getElementsByClassName("ytd-menu-popup-renderer")[4].click() | |
}, 300); | |
await sleep(300); | |
clearTimeout(timeout); | |
} | |
} | |
} | |
deleteLiked(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment