JS to external file