Can now open JSON files

This commit is contained in:
mattpass
2020-07-14 19:40:40 +01:00
parent b009ef24ab
commit 6210eca0bd
2 changed files with 2 additions and 1 deletions

View File

@@ -1446,6 +1446,7 @@ var ICEcoder = {
fileExt = fileExt[fileExt.length - 1];
caretLocType =
fileExt === "js" ? "JavaScript"
: fileExt === "json" ? "JavaScript"
: fileExt === "coffee" ? "CoffeeScript"
: fileExt === "ts" ? "TypeScript"
: fileExt === "py" ? "Python"

View File

@@ -141,7 +141,7 @@ class File
$finfo = "other";
};
}
if (0 === strpos($finfo, "text") || 0 === strpos($finfo, "application/xml") || false !== strpos($finfo, "empty")) {
if (0 === strpos($finfo, "text") || 0 === strpos($finfo, "application/json") || 0 === strpos($finfo, "application/xml") || false !== strpos($finfo, "empty")) {
echo 'fileType="text";';
// Get file over FTP?