Skip to content

Commit 410ef38

Browse files
committed
Load partial JS file in now
1 parent d5c019d commit 410ef38

1 file changed

Lines changed: 1 addition & 25 deletions

File tree

processes/on-editor-load.php

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,7 @@
3030
cMdiff.setOption("mode",mode);
3131
}
3232
} else if (cM && fileName) {
33-
fileExt = fileName.split(".");
34-
fileExt = fileExt[fileExt.length-1];
35-
var mode =
36-
fileExt == "js" || fileExt == "json" ? "text/javascript"
37-
: fileExt == "coffee" ? "text/x-coffeescript"
38-
: fileExt == "rb" ? "text/x-ruby"
39-
: fileExt == "py" ? "text/x-python"
40-
: fileExt == "css" ? "text/css"
41-
: fileExt == "less" ? "text/x-less"
42-
: fileExt == "md" ? "text/x-markdown"
43-
: fileExt == "xml" ? "application/xml"
44-
: fileExt == "sql" ? "text/x-mysql" // also text/x-sql, text/x-mariadb, text/x-cassandra or text/x-plsql
45-
: fileExt == "erl" ? "text/x-erlang"
46-
: fileExt == "yaml" ? "text/x-yaml"
47-
: fileExt == "java" ? "text/x-java"
48-
: fileExt == "jl" ? "text/x-julia"
49-
: fileExt == "c" ? "text/x-csrc"
50-
: fileExt == "cpp" ? "text/x-c++src"
51-
: fileExt == "ino" ? "text/x-c++src"
52-
: fileExt == "cs" ? "text/x-csharp"
53-
: fileExt == "go" ? "text/x-go"
54-
: fileExt == "lua" ? "text/x-lua"
55-
: fileExt == "pl" ? "text/x-perl"
56-
: fileExt == "scss" ? "text/x-sass"
57-
: "application/x-httpd-php";
33+
<?php include(dirname(__FILE__)."/../lib/language-modes-partial.js");?>
5834

5935
if (mode != cM.getOption("mode")) {
6036
cM.setOption("mode",mode);

0 commit comments

Comments
 (0)