diff options
| author | czaks <marcin@6irc.net> | 2015-08-11 03:55:44 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-08-11 03:55:44 +0200 |
| commit | 77bec71399c768080e6490675723718fb9dffba5 (patch) | |
| tree | 4e91022451f6f4322d17682e09a5038876de7e11 /js/expand-video.js | |
| parent | a54488d9005e4befc4cec5cf3060b58264a6e7d3 (diff) | |
expand-video.js: works with .mp4 now as well
Diffstat (limited to 'js/expand-video.js')
| -rw-r--r-- | js/expand-video.js | 4 |
1 files 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); } } } |
