youtubehelper

How to bulk delete all YouTube comments


Ever wanted to remove your entire comment history quickly without deleting your channel?

Apparently I need a minimum amount of characters to post


Solution

  • They changed the label to include the full comment so each X has a different label. this now just looks for the word Delete that is at the start of each label for the X:

    const commentDeleteButtons = document.querySelectorAll('[aria-label~="Delete"]');
    
    for (let button of commentDeleteButtons) {
        const clickEvent = document.createEvent('Events');
        clickEvent.initEvent('click', true, false);
        button.dispatchEvent(clickEvent);
    }