Insert additional JS in the right place