X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=js%2F90-divine-format.js;h=a842de1353c790ea649ba05cdfff7ce53f67a178;hb=dd962dd2b75089dabe9f01ddad0a51529e78f3ec;hp=ab5a5f29fae79797592f7aae43fcef65d9e96e95;hpb=8345760abf4953980a85e0d5f9cade421f73d4ff;p=gruntmaster-page.git diff --git a/js/90-divine-format.js b/js/90-divine-format.js index ab5a5f2..a842de1 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', @@ -30,11 +30,11 @@ var ext_table = { } 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]; } $(() => $('#prog').on('change', divine_format));