VideoID is equal to last youtubeMatches

This commit is contained in:
Madh93 2014-10-14 21:32:47 +01:00
parent 59479ea406
commit bc5a03c99a

View File

@ -3321,7 +3321,7 @@ angular.module('myApp.services', ['myApp.i18n'])
// console.log(4, text, html);
if (!options.noLinks) {
var youtubeMatches = text.match(youtubeRegex),
videoID = youtubeMatches && youtubeMatches[1];
videoID = youtubeMatches && youtubeMatches[youtubeMatches.length-1];
if (videoID) {
var tag = Config.Modes.chrome_packed ? 'webview' : 'iframe';