Syntax association for custom file types

I have a custom file type the contents of which are very close to javascript. Is there any way to direct github to interpret the custom types as a known language such as javascript?

My aim is to have the syntax highlighting when viewing files via the github site and more importantly to leverage meta information displayed in git compare that displays the function name in which a change has taken place.