blob: 86b48c87c297a7105059217ed4df2ff56554e8f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function pathIsVideoFile(path) {
return /\.(mp4|ogg|mpg|avi|mov)$/i.test(path);
}
function pathIsAudioFile(path) {
return /\.(mp3|m4a|wav)$/i.test(path);
}
function pathIsImageFile(path) {
return /\.(jpg|png|gif)$/i.test(path);
}
function pathIsHtmlFile(path) {
return /\.(htm|html|txt)$/i.test(path);
}
function pathIsPdfFile(path) {
return /\.(pdf)$/i.test(path);
}
|