// leave at least 2 line with only a star on it below, or doc generation fails1/**2*3*4* Placeholder for custom user javascript5* mainly to be overridden in profile/static/custom/custom.js6* This will always be an empty file in IPython7*8* User could add any javascript in the `profile/static/custom/custom.js` file.9* It will be executed by the ipython notebook at load time.10*11* Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook.12*13*14* The object available at load time depend on the version of IPython in use.15* there is no guaranties of API stability.16*17* The example below explain the principle, and might not be valid.18*19* Instances are created after the loading of this file and might need to be accessed using events:20* define([21* 'base/js/namespace',22* 'base/js/events'23* ], function(IPython, events) {24* events.on("app_initialized.NotebookApp", function () {25* IPython.keyboard_manager....26* });27* });28*29* __Example 1:__30*31* Create a custom button in toolbar that execute `%qtconsole` in kernel32* and hence open a qtconsole attached to the same kernel as the current notebook33*34* define([35* 'base/js/namespace',36* 'base/js/events'37* ], function(IPython, events) {38* events.on('app_initialized.NotebookApp', function(){39* IPython.toolbar.add_buttons_group([40* {41* 'label' : 'run qtconsole',42* 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons43* 'callback': function () {44* IPython.notebook.kernel.execute('%qtconsole')45* }46* }47* // add more button here if needed.48* ]);49* });50* });51*52* __Example 2:__53*54* At the completion of the dashboard loading, load an unofficial javascript extension55* that is installed in profile/static/custom/56*57* define([58* 'base/js/events'59* ], function(events) {60* events.on('app_initialized.DashboardApp', function(){61* require(['custom/unofficial_extension.js'])62* });63* });64*65* __Example 3:__66*67* Use `jQuery.getScript(url [, success(script, textStatus, jqXHR)] );`68* to load custom script into the notebook.69*70* // to load the metadata ui extension example.71* $.getScript('/static/notebook/js/celltoolbarpresets/example.js');72* // or73* // to load the metadata ui extension to control slideshow mode / reveal js for nbconvert74* $.getScript('/static/notebook/js/celltoolbarpresets/slideshow.js');75*76*77* @module IPython78* @namespace IPython79* @class customjs80* @static81*/828384