1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Refactor handling of .htm and .hta file extensions

Taking advantage of the recent change to be able to pass an array of
file extensions to `$tw.utils.registerFileType()`
This commit is contained in:
Jermolene 2014-09-16 20:05:13 +01:00
parent 60541c5a6e
commit 2b78d5a977

View File

@ -1731,9 +1731,7 @@ $tw.boot.startup = function(options) {
$tw.utils.registerFileType("text/vnd.tiddlywiki2-recipe","utf8",".recipe"); $tw.utils.registerFileType("text/vnd.tiddlywiki2-recipe","utf8",".recipe");
$tw.utils.registerFileType("text/plain","utf8",".txt"); $tw.utils.registerFileType("text/plain","utf8",".txt");
$tw.utils.registerFileType("text/css","utf8",".css"); $tw.utils.registerFileType("text/css","utf8",".css");
$tw.utils.registerFileType("text/html","utf8",".html"); $tw.utils.registerFileType("text/html","utf8",[".html",".htm"]);
$tw.config.fileExtensionInfo[".htm"] = {type: "text/html"};
$tw.config.fileExtensionInfo[".hta"] = {type: "text/html"};
$tw.utils.registerFileType("application/hta","utf16le",".hta",{deserializerType:"text/html"}); $tw.utils.registerFileType("application/hta","utf16le",".hta",{deserializerType:"text/html"});
$tw.utils.registerFileType("application/javascript","utf8",".js"); $tw.utils.registerFileType("application/javascript","utf8",".js");
$tw.utils.registerFileType("application/json","utf8",".json"); $tw.utils.registerFileType("application/json","utf8",".json");