Added option to use it as it where a real javascript file

in my project i found it much nicer to use it as it where a real javascript, so i added this possibility.
This makes sense when running under CGI-Environment.

this is my first pull request so dont be too hard :)