How to add custom javascript (js) to timelion

Zach has written a really cool article, but we get an exception trying to follow his steps. Unfortunately the server guy has removed the exception..and I'll try and comment on this post, but is this really the way to add custom js?

The custom movingstd() and showifgreater() Timelion functions can be found here. Shut down Kibana, add the functions to your Timelion source (kibana/installedPlugins/timelion/series_functions/<function_name>.js), delete the optimized bundle (rm kibana/optimize/bundles/timelion.bundle.js) and restart Kibana. The functions should be available for use in Timelion now.

is this really the way to add custom js?

Yes, it is.

I'm not totally sure you need to remove the optimized bundle, but it does need to run a rebuild, and removing the bundle is a sure-fire way to achieve that.

For what it's worth, it looks like the movingstd stuff has been merged into master.

Thanks..will try again.

I got the same problem.
After adding a custom js function to timelion and remove timelion.bundle.js I restarted Kibana but got stuck at loading interface in Kibana.

Is there any way to rebuild optimize bundle appropriately?
Why my Kibana stuck at loading interface?

Thanks

We followed the steps posted and it worked the second time. However I did not do it so I'm not sure what the difference was. I asked the timelion creator and he says that for sure it's the right steps.