code highlight, syntax fixes

 - added JavaScript and shell code highlight
 - fixed some missing semicolon
 - replaced multiple var declarations with one
Merge pull request #1930 from IonicaBizau/3.8.x

code highlight, syntax fixes