Added javascript support

If main file has file ending .js, then run in jsMode