1
Fork 0
poke/html/video-error.ejs
2024-09-15 12:08:28 +00:00

22 lines
501 B
Text

<%
function isValidYouTubeID(v) {
return /^[a-zA-Z0-9_-]{11}$/.test(v);
}
function isLetterSpam(v) {
return /^(.)\1+$/.test(v);
}
let reason;
if (!isValidYouTubeID(v) || isLetterSpam(v)) {
reason = "Video not found :c";
} else {
reason = "youtube probably blocked youtube or the api server is down qwq - report https://discord.poketube.fun :p";
}
%>
<%- include('./layouts/error-video.ejs', {
error: "oops - loading failed :c",
description: `${reason}`
}) %>