Hi!
I have the same question, I've already tried your answer copying the .js file in the specified folder. Then added the code line in the head.php in the section where it says "// include JavaScript". Writing it the same way you wrote it produces an error and the webpage won't load. So I tried typing it like other .js files are loaded which is "$this->API->addJS($this->API->URLtemplate() . '/js/myfile.js');"
The problem is that nothing happens. I made a test writing just an alert in jQuery in the .js file but nothing happens. Please help, what I'm doing wrong.
Thanks in advance for your help!