From f6efdee873a17b13f17508b78cf6fc32c0c539d7 Mon Sep 17 00:00:00 2001 From: czaks Date: Tue, 11 Aug 2015 03:59:18 +0200 Subject: [PATCH] expand-video.js: fix regexp --- js/expand-video.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/expand-video.js b/js/expand-video.js index f53f57f4..08b474c1 100644 --- a/js/expand-video.js +++ b/js/expand-video.js @@ -204,13 +204,13 @@ function setupVideo(thumb, url) { function setupVideosIn(element) { var thumbs = element.querySelectorAll("a.file"); for (var i = 0; i < thumbs.length; i++) { - if (/\.webm|\.mp4$/.test(thumbs[i].pathname)) { + if (/\.webm$|\.mp4$/.test(thumbs[i].pathname)) { setupVideo(thumbs[i], thumbs[i].href); } else { var m = thumbs[i].search.match(/\bv=([^&]*)/); if (m != null) { var url = decodeURIComponent(m[1]); - if (/\.webm|\.mp4$/.test(url)) setupVideo(thumbs[i], url); + if (/\.webm$|\.mp4$/.test(url)) setupVideo(thumbs[i], url); } } }