1
Fork 0

add regex :3

This commit is contained in:
ashley 2024-05-10 10:55:04 +00:00
parent 78de660963
commit d9ac3f21d0

View file

@ -167,7 +167,9 @@ class InnerTubePokeVidious {
*/ */
isvalidvideo(v) { isvalidvideo(v) {
if (v != "assets" && v != "cdn-cgi" && v != "404") { if (v != "assets" && v != "cdn-cgi" && v != "404") {
return true; const regex = new RegExp("^([a-zA-Z0-9_-]{11})");
const isMatch = regex.test(v);
return isMatch;
} else { } else {
return false; return false;
} }