Injecting javascript to initialize IPython.events