X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-divine-format.js;h=2fdc65f849fbe065ac519de12c76c3ac8f6c7dda;hb=refs%2Fheads%2Fnewmc;hp=da4885695889324bcd9a0712920901b7b5385cee;hpb=65d5cb3b6007fa0bc758722983b3f0afefc02f2e;p=gruntmaster-page.git diff --git a/js/90-divine-format.js b/js/90-divine-format.js index da48856..2fdc65f 100644 --- a/js/90-divine-format.js +++ b/js/90-divine-format.js @@ -6,6 +6,8 @@ const ext_table = { 'cxx' : 'CPP', 'C' : 'CPP', + 'd' : 'D', + 'go' : 'GOLANG', 'gs' : 'GOLFSCRIPT', @@ -13,6 +15,10 @@ const ext_table = { 'hs' : 'HASKELL', 'lhs' : 'HASKELL', + 'm' : 'OBERON', + + 'ml' : 'OCAML', + 'lisp': 'SBCL', 'lsp' : 'SBCL', 'cl' : 'SBCL', @@ -24,17 +30,19 @@ const ext_table = { 'pl' : 'PERL', + 'php' : 'PHP', + 'py' : 'PYTHON', 'rb' : 'RUBY' } function divine_format() { - const filename = $('#prog')[0].value; + 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]; } $(() => $('#prog').on('change', divine_format));