X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-divine-format.js;h=2fdc65f849fbe065ac519de12c76c3ac8f6c7dda;hb=68b0f287c76694f2935b6039a42d6359287f4c4f;hp=e44bf908b4a3395a36fd6e5e734803c54aca0da2;hpb=502d9da0a5843c9ecef1a6226f98ed3d5a233dbc;p=plack-app-gruntmaster.git diff --git a/js/90-divine-format.js b/js/90-divine-format.js index e44bf90..2fdc65f 100644 --- a/js/90-divine-format.js +++ b/js/90-divine-format.js @@ -1,4 +1,4 @@ -var ext_table = { +const ext_table = { 'c' : 'C', 'cc' : 'CPP', @@ -6,6 +6,8 @@ var ext_table = { 'cxx' : 'CPP', 'C' : 'CPP', + 'd' : 'D', + 'go' : 'GOLANG', 'gs' : 'GOLFSCRIPT', @@ -13,6 +15,10 @@ var ext_table = { 'hs' : 'HASKELL', 'lhs' : 'HASKELL', + 'm' : 'OBERON', + + 'ml' : 'OCAML', + 'lisp': 'SBCL', 'lsp' : 'SBCL', 'cl' : 'SBCL', @@ -24,19 +30,19 @@ var ext_table = { 'pl' : 'PERL', + 'php' : 'PHP', + 'py' : 'PYTHON', 'rb' : 'RUBY' } 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));