]> iEval git - gruntmaster-page.git/blame - js/90-divine-format.js
Add Oberon
[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
9 'go' : 'GOLANG',
10
11 'gs' : 'GOLFSCRIPT',
12
13 'hs' : 'HASKELL',
14 'lhs' : 'HASKELL',
15
bf660b84
MG
16 'm' : 'OBERON',
17
502d9da0
MG
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
7093e9ba 34function divine_format() {
dee46c5b 35 const filename = q('#prog').value;
65d5cb3b 36 const ext = /\.([^.]*)$/.exec(filename)[1];
502d9da0
MG
37
38 if(ext_table[ext])
dee46c5b 39 q('#prog_format').value = ext_table[ext];
7093e9ba
MG
40}
41
8345760a 42$(() => $('#prog').on('change', divine_format));
This page took 0.027195 seconds and 4 git commands to generate.