]> iEval git - gruntmaster-page.git/blob - js/90-divine-format.js
Remove X-Static support
[gruntmaster-page.git] / js / 90-divine-format.js
1 const ext_table = {
2 'c' : 'C',
3
4 'cc' : 'CPP',
5 'cpp' : 'CPP',
6 'cxx' : 'CPP',
7 'C' : 'CPP',
8
9 'go' : 'GOLANG',
10
11 'gs' : 'GOLFSCRIPT',
12
13 'hs' : 'HASKELL',
14 'lhs' : 'HASKELL',
15
16 'lisp': 'SBCL',
17 'lsp' : 'SBCL',
18 'cl' : 'SBCL',
19 'l' : 'SBCL',
20
21 'java': 'JAVA',
22
23 'pas' : 'PASCAL',
24
25 'pl' : 'PERL',
26
27 'py' : 'PYTHON',
28
29 'rb' : 'RUBY'
30 }
31
32 function divine_format() {
33 const filename = q('#prog').value;
34 const ext = /\.([^.]*)$/.exec(filename)[1];
35
36 if(ext_table[ext])
37 q('#prog_format').value = ext_table[ext];
38 }
39
40 $(() => $('#prog').on('change', divine_format));
This page took 0.04072 seconds and 4 git commands to generate.