Skip to content

Commit 4f6fb8a

Browse files
author
p01
committed
DRY cls.ResourceUtil.mime_to_content_mode and cls.ResourceUtil.type_to_content_mode
1 parent 1fef009 commit 4f6fb8a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/resource-manager/resource_util.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,7 @@ cls.ResourceUtil.type_to_string_map = {
157157
cls.ResourceUtil.mime_to_content_mode = function(mime)
158158
{
159159
var type = cls.ResourceUtil.mime_to_type(mime);
160-
switch (type) {
161-
case "image":
162-
case "video":
163-
case "audio":
164-
case "pdf":
165-
case "flash":
166-
case "font":
167-
return "datauri";
168-
case "markup":
169-
case "css":
170-
case "xml":
171-
case "script":
172-
return "text";
173-
}
174-
return "text";
160+
return cls.ResourceUtil.type_to_content_mode(type);
175161
}
176162

177163
/**

0 commit comments

Comments
 (0)