Delete All YouTube Watch Later and Liked Videos · cho.sh
Delete All YouTube Watch Later and Liked Videos
Delete All YouTube Watch Later and Liked Videos
Warning
This post is more than a year old. Information may be outdated.
Go to the page and run this in the console.
Sometimes after completion, if you refresh the page, there still might be some videos. This is a YouTube bug. Run it multiple times until you're satisfied.
(async () => { // Function to wait for an element to be present in the DOM const waitForElement = (selector, timeout = 10000) => { return new Promise((resolve, reject) => { const element = document.querySelector(selector); if (element) { resolve(element); }
else
{
const observer = new MutationObserver((mutations) => {
const element = document.querySelector(selector);
if (element) {
resolve(element);
observer.disconnect();
}
});
observer.observe(document.body, {
childList: true,
subtree: true,
});
setTimeout(() => {
reject(new Error(`Element ${selector} not found`));
}, timeout);
}
});
};
// Function to scroll to the bottom of the page until the number of list items doesn't change