Removed getYouTubeVideoID

This commit is contained in:
Official Noob
2019-08-04 19:07:00 +01:00
committed by GitHub
parent 5ee279dec7
commit d25792f39a

View File

@@ -1127,13 +1127,6 @@ function runThePopup() {
xmlhttp.send();
}
function getYouTubeVideoID(url) { // Returns with video id else returns false
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
var match = url.match(regExp);
var id = new URL(url).searchParams.get("v");
return (match && match[7].length == 11) ? id : false;
}
//end of function
}