Here is some code to translate FORTRAN to Javascript and a runtime required to run the generated code.

I have tested this primarily on the NAIF SPICE toolkit, and the code is very specifically targeted at that. It probably won't work for you.

QuantumG