Skip to content

Commit

Permalink
More mime types
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Apr 2, 2014
1 parent 0be9a32 commit d497479
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,32 @@ define(function() {
isImage: function(ext) {
return ext === '.png' ||
ext === '.jpg' ||
ext === '.jpe' ||
ext === '.pjpg' ||
ext === '.jpeg'||
ext === '.gif';
ext === '.gif' ||
ext === '.bmp' ||
ext === '.ico';
},

isHTML: function(ext) {
return ext === '.html' || ext === '.htm';
return ext === '.html' ||
ext === '.htm' ||
ext === '.htx' ||
ext === '.htmls';
},

mimeFromExt: function(ext) {
switch(ext) {
case '.html':
case '.htmls':
case '.htm':
case '.htx':
return 'text/html';
case '.ico':
return 'image/x-icon';
case '.bmp':
return 'image/bmp';
case '.css':
return 'text/css';
case '.js':
Expand All @@ -41,6 +56,7 @@ define(function() {
case '.ico':
return 'image/x-icon';
case '.jpg':
case '.jpe':
case '.jpeg':
return 'image/jpeg';
case '.gif':
Expand Down

0 comments on commit d497479

Please sign in to comment.