2024-09-11 22:24:49 +02:00
|
|
|
<%
|
|
|
|
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)) {
|
2024-09-15 14:10:55 +02:00
|
|
|
reason = "Video not found >~<";
|
2024-09-11 22:24:49 +02:00
|
|
|
} else {
|
2024-10-24 21:36:04 +02:00
|
|
|
reason = "This helps protect our community. Learn more (TRYING AGAIN....)";
|
2024-09-11 22:24:49 +02:00
|
|
|
}
|
|
|
|
%>
|
|
|
|
|
|
|
|
<%- include('./layouts/error-video.ejs', {
|
2024-10-24 21:36:04 +02:00
|
|
|
error: "loading failed :c",
|
2024-09-11 22:24:49 +02:00
|
|
|
description: `${reason}`
|
2024-09-11 17:47:36 +02:00
|
|
|
}) %>
|
2024-10-12 15:52:48 +02:00
|
|
|
|
2024-10-24 21:36:04 +02:00
|
|
|
|