From bc5a03c99a05bda59596300cc791bcc9c33084db Mon Sep 17 00:00:00 2001 From: Madh93 Date: Tue, 14 Oct 2014 21:32:47 +0100 Subject: [PATCH] VideoID is equal to last youtubeMatches --- app/js/services.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/services.js b/app/js/services.js index 3680d237..c3dddbc2 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -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';