How to inject local javascript file?

Add-in Express™ Support Service
That's what is more important than anything else

How to inject local javascript file?
Konrad Gorski



I found some explanations how to inject javascript fr om external server, for example here:
Working good ;)
I have ca. 15 js files, more than 0.5MB to inject, development phase ;)
I'm looking now for possibility to hold all my javascript files locally, in add-on 'body' (or somewh ere in file system).

Is it possible? Give me some tips, please.

Posted 23 Jul, 2012 06:30:42 Top
Eugene Astafiev


Hi Konrad,

Of course, you can keep the JS code locally and inject it into the web page at runtime. However, 0.5 MB is too much for such things. That is why I would recommend moving all the code to the add-on rails.

Also please take a look at sample add-on project available for downloading in the HOWTO section of our web site.
Posted 23 Jul, 2012 07:03:55 Top