Update custom.js for 3.0

I use custom.js in development`3.0.0-dev`. but it not work. my custom.js like this:

```python
IPython.events.on('app_initialized.NotebookApp', function(){                                                                                                   
        function to(mode) {                                                                                                                                    
            var mode = mode || 'vim'                                                                                                                           
            // first let's apply vim mode to all current cells                                                                                                 
            function to_mode(c) { return c.code_mirror.setOption('keyMap', mode);};                                                                            
            IPython.notebook.get_cells().map(to_mode);                                                                                                         
            // apply the mode to future cells created                                                                                                          
            IPython.Cell.options_default.cm_config.keyMap = mode;                                                                                              
        }                                                                                                                                                      
                                                                                                                                                               
        require(["codemirror/keymap/emacs"],                                                                                                                   
                function (emacs) {                                                                                                                             
                    to('emacs');                                                                                                                               
                    console.log('emacs.js loaded');                                                                                                            
                });                                                                                                                                            
})                                                                                                                                                             
                   
```

the broswer said: 

```python
 IPython.events.on is not a function
```
If use `$([IPython.events])` said: 

```python
ReferenceError: $ is not defined
```

I think `main.js` should not depend on the `custom.js`,  this make load custom.js first. but in custom.js, IPython has not been set up. I hope to have a better solution 

```