Question: Custom JavaScript file in Galaxy
gravatar for ebiokit
2.4 years ago by
ebiokit10 wrote:

Hi all!

I want to add some custom features to my own Galaxy instance and I need to load a new JavaScript file when Galaxy starts. Now I'm loading the JS file in /usr/local/galaxy/templates/js-app.mako as follows:

    <body scroll="no" class="full-content">
        ## js libraries and bundled js app (line ~43)
        ${ h.js(
            'bundled/' + js_app_name + '.bundled',

However, I'm pretty sure that there is an easier and more correct way to do it.

Any ideas?

Many thanks!!



javascript development galaxy • 692 views
ADD COMMENTlink modified 2.3 years ago by carlfeberhard390 • written 2.4 years ago by ebiokit10
gravatar for carlfeberhard
2.3 years ago by
United States
carlfeberhard390 wrote:

That way will load via a script tag with a cache buster. It'll have access to all the globals we currently use (requirejs, jquery, backbone, etc.) and most of the app is decorated onto the global object Galaxy.

Although not entirely ideal, that spot is as good a place as any currently. Is there something missing that could be added to help your goals?

ADD COMMENTlink written 2.3 years ago by carlfeberhard390
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 167 users visited in the last hour