blob: 85288093a49e3cf49b553fe46833c48a90f94663 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// 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);
}
|