]> iEval git - gruntmaster-page.git/blame - js/90-divine-format.js
Use brotli in make_static.PL if available
[gruntmaster-page.git] / js / 90-divine-format.js
CommitLineData
65d5cb3b 1const ext_table = {
502d9da0
MG
2 'c' : 'C',
3
4 'cc' : 'CPP',
5 'cpp' : 'CPP',
6 'cxx' : 'CPP',
7 'C' : 'CPP',
8
6a946025
MG
9 'd' : 'D',
10
502d9da0
MG
11 'go' : 'GOLANG',
12
13 'gs' : 'GOLFSCRIPT',
14
15 'hs' : 'HASKELL',
16 'lhs' : 'HASKELL',
17
bf660b84
MG
18 'm' : 'OBERON',
19
6a946025
MG
20 'ml' : 'OCAML',
21
502d9da0
MG
22 'lisp': 'SBCL',
23 'lsp' : 'SBCL',
24 'cl' : 'SBCL',
25 'l' : 'SBCL',
26
27 'java': 'JAVA',
28
29 'pas' : 'PASCAL',
30
31 'pl' : 'PERL',
32
6a946025
MG
33 'php' : 'PHP',
34
502d9da0
MG
35 'py' : 'PYTHON',
36
37 'rb' : 'RUBY'
38}
39
7093e9ba 40function divine_format() {
dee46c5b 41 const filename = q('#prog').value;
65d5cb3b 42 const ext = /\.([^.]*)$/.exec(filename)[1];
502d9da0
MG
43
44 if(ext_table[ext])
dee46c5b 45 q('#prog_format').value = ext_table[ext];
7093e9ba
MG
46}
47
8345760a 48$(() => $('#prog').on('change', divine_format));
This page took 0.027281 seconds and 4 git commands to generate.