Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JS snippet to check whether a YouTube video is available or not
// Load a YT URL like https://www.youtube.com/watch?v=XYZABC
let is_not_available = ["video unavailable", "video isn't available"].
some(needle =>
document.getElementById("contents").textContent.toLowerCase().includes(needle));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment