From 77bec71399c768080e6490675723718fb9dffba5 Mon Sep 17 00:00:00 2001 From: czaks Date: Tue, 11 Aug 2015 03:55:44 +0200 Subject: [PATCH] expand-video.js: works with .mp4 now as well --- 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 79872510..f53f57f4 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$/.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$/.test(url)) setupVideo(thumbs[i], url); + if (/\.webm|\.mp4$/.test(url)) setupVideo(thumbs[i], url); } } }