Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for KuCalc : devops.
Download
50655 views
1
// leave at least 2 line with only a star on it below, or doc generation fails
2
/**
3
*
4
*
5
* Placeholder for custom user javascript
6
* mainly to be overridden in profile/static/custom/custom.js
7
* This will always be an empty file in IPython
8
*
9
* User could add any javascript in the `profile/static/custom/custom.js` file
10
* (and should create it if it does not exist).
11
* It will be executed by the ipython notebook at load time.
12
*
13
* Same thing with `profile/static/custom/custom.css` to inject custom css into the notebook.
14
*
15
* Example :
16
*
17
* Create a custom button in toolbar that execute `%qtconsole` in kernel
18
* and hence open a qtconsole attached to the same kernel as the current notebook
19
*
20
* $([IPython.events]).on('app_initialized.NotebookApp', function(){
21
* IPython.toolbar.add_buttons_group([
22
* {
23
* 'label' : 'run qtconsole',
24
* 'icon' : 'icon-terminal', // select your icon from http://fortawesome.github.io/Font-Awesome/icons
25
* 'callback': function () {
26
* IPython.notebook.kernel.execute('%qtconsole')
27
* }
28
* }
29
* // add more button here if needed.
30
* ]);
31
* });
32
*
33
* Example :
34
*
35
* Use `jQuery.getScript(url [, success(script, textStatus, jqXHR)] );`
36
* to load custom script into the notebook.
37
*
38
* // to load the metadata ui extension example.
39
* $.getScript('/static/notebook/js/celltoolbarpresets/example.js');
40
* // or
41
* // to load the metadata ui extension to control slideshow mode / reveal js for nbconvert
42
* $.getScript('/static/notebook/js/celltoolbarpresets/slideshow.js');
43
*
44
*
45
* @module IPython
46
* @namespace IPython
47
* @class customjs
48
* @static
49
*/
50
51