diff options
| author | czaks <marcin@6irc.net> | 2015-08-11 03:59:18 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-08-11 03:59:18 +0200 |
| commit | f6efdee873a17b13f17508b78cf6fc32c0c539d7 (patch) | |
| tree | 3b734fc7b371e5824416812d6d791613be57054b /js | |
| parent | 77bec71399c768080e6490675723718fb9dffba5 (diff) | |
expand-video.js: fix regexp
Diffstat (limited to '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 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); } } } |
