summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/media-utility.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/bg/js/media-utility.js b/ext/bg/js/media-utility.js
index febc509a..8a46cb49 100644
--- a/ext/bg/js/media-utility.js
+++ b/ext/bg/js/media-utility.js
@@ -16,13 +16,13 @@
*/
const mediaUtility = (() => {
- function getFileNameExtension(fileName) {
- const match = /\.[^.]*$/.exec(fileName);
+ function getFileNameExtension(path) {
+ const match = /\.[^./\\]*$/.exec(path);
return match !== null ? match[0] : '';
}
- function getImageMediaTypeFromFileName(fileName) {
- switch (getFileNameExtension(fileName).toLowerCase()) {
+ function getImageMediaTypeFromFileName(path) {
+ switch (getFileNameExtension(path).toLowerCase()) {
case '.apng':
return 'image/apng';
case '.bmp':