зеркало из https://github.com/mozilla/popcorn-js.git
Fixed youtube regex.
This commit is contained in:
Родитель
423aec6e25
Коммит
b6ea59fa98
|
@ -59,7 +59,7 @@ var onYouTubePlayerReady;
|
|||
return;
|
||||
}
|
||||
|
||||
var matches = url.match( /((http:\/\/)?www\.)?youtube\.[a-z]+\/watch\?v\=[a-z0-9]+/i );
|
||||
var matches = url.match( /((http:\/\/)?www\.)?youtube\.[a-z]+\/watch\?v\=[a-z0-9_]+/i );
|
||||
// Return id, which comes after first equals sign
|
||||
return matches ? matches[0].split( "=" )[1] : "";
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ var onYouTubePlayerReady;
|
|||
return;
|
||||
}
|
||||
|
||||
var matches = url.match( /^http:\/\/?www\.youtube\.[a-z]+\/e\/[a-z0-9]+/i );
|
||||
var matches = url.match( /^http:\/\/?www\.youtube\.[a-z]+\/e\/[a-z0-9_]+/i );
|
||||
|
||||
// Return id, which comes after first equals sign
|
||||
return matches ? matches[0].split( "/e/" )[1] : "";
|
||||
|
|
Загрузка…
Ссылка в новой задаче