]> iEval git - gruntmaster-page.git/blob - js/90-divine-format.js
Prevent participation in both divisions of a round
[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 'm' : 'OBERON',
17
18 'lisp': 'SBCL',
19 'lsp' : 'SBCL',
20 'cl' : 'SBCL',
21 'l' : 'SBCL',
22
23 'java': 'JAVA',
24
25 'pas' : 'PASCAL',
26
27 'pl' : 'PERL',
28
29 'py' : 'PYTHON',
30
31 'rb' : 'RUBY'
32 }
33
34 function divine_format() {
35 const filename = q('#prog').value;
36 const ext = /\.([^.]*)$/.exec(filename)[1];
37
38 if(ext_table[ext])
39 q('#prog_format').value = ext_table[ext];
40 }
41
42 $(() => $('#prog').on('change', divine_format));
This page took 0.042948 seconds and 4 git commands to generate.