From 2b78d5a97770407ced2a7cf9cd8a9a7993b34451 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 16 Sep 2014 20:05:13 +0100 Subject: [PATCH] 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()` --- boot/boot.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index b1c59aae0..b51257d54 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1731,9 +1731,7 @@ $tw.boot.startup = function(options) { $tw.utils.registerFileType("text/vnd.tiddlywiki2-recipe","utf8",".recipe"); $tw.utils.registerFileType("text/plain","utf8",".txt"); $tw.utils.registerFileType("text/css","utf8",".css"); - $tw.utils.registerFileType("text/html","utf8",".html"); - $tw.config.fileExtensionInfo[".htm"] = {type: "text/html"}; - $tw.config.fileExtensionInfo[".hta"] = {type: "text/html"}; + $tw.utils.registerFileType("text/html","utf8",[".html",".htm"]); $tw.utils.registerFileType("application/hta","utf16le",".hta",{deserializerType:"text/html"}); $tw.utils.registerFileType("application/javascript","utf8",".js"); $tw.utils.registerFileType("application/json","utf8",".json");