-var ext_table = {
+const ext_table = {
'c' : 'C',
'cc' : 'CPP',
'hs' : 'HASKELL',
'lhs' : 'HASKELL',
+ 'm' : 'OBERON',
+
'lisp': 'SBCL',
'lsp' : 'SBCL',
'cl' : 'SBCL',
}
function divine_format() {
- var filename = $('#prog')[0].value;
- var ext = /\.([^.]*)$/.exec(filename)[1];
+ const filename = q('#prog').value;
+ const ext = /\.([^.]*)$/.exec(filename)[1];
if(ext_table[ext])
- $('#prog_format')[0].value = ext_table[ext];
+ q('#prog_format').value = ext_table[ext];
}
-$(function() {
- $('#prog').on('change', divine_format);
-});
+$(() => $('#prog').on('change', divine_format));