Hi!
TrID indeed isn't really suite for (what basically are) text files. It can recognize some text based filetypes, when there are some common text parts at fixed positions. Instead, something very "free from" like a source code usually can be recognized with the current approach.
So, yes, JavaScript files aren't on the
list of TrID's supported filetypes.
You are off course free to try to create a new def for them (as for any other filetype), but probably sooner or later, you'll find that
TrIDScan will warn you that there aren't enough patterns anymore.
Thanks for your feedback,
Bye!