mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 00:58:58 +01:00
add regex :3
This commit is contained in:
parent
78de660963
commit
d9ac3f21d0
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue