Allow for a custom javascript init function