File size: 1,120 Bytes
f67f72f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Small extension to add an help menu pointing 
// to jupyter_contrib_nbextensions at readthedocs.

define(['jquery', 'base/js/namespace'], function($, Jupyter) {
    "use strict";

    function add_help_menu_item() {

        if ($('#jupyter_contrib_nbextensions_help').length > 0) {
            return;
        }
        var menu_item = $('<li/>')
            .append(
                $('<a/>')
                .html('Jupyter-contrib <br> nbextensions')
                .attr('title', 'Jupyter_contrib_nbextensions documentation')
                .attr('id', "jupyter_contrib_nbextensions_help")
                .attr('href', 'http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/')
                .attr('target', "_blank")
                .append(
                    $('<i/>')
                    .addClass('fa fa-external-link menu-icon pull-right')
                ))
        menu_item.insertBefore($($("#help_menu > .divider")[1]))
    }


    var load_ipython_extension = function() {
        add_help_menu_item();
    };

    return {
        load_ipython_extension: load_ipython_extension
    };
});