Hi,
If I wanted to add a custom notebook action for showing/hiding/toggling
menu bar, would including the code below
into /notebook/static/notebook/js/actions.js work and correctly add entry
to /.jupyter/nbconfig/notebook.json if a custom keyboard shortcut was
created?
'toggle-menubar':{
help: 'hide/show the menu bar',
handler : function(env) {
var value = !env.notebook.menubar;
if (value === true) {
$('#menubar-container').show();
} else if (value === false) {
$('#menubar-container').hide();
}
events.trigger('resize-header.Page');
env.notebook.menubar = value;
}
},
'show-menubar':{
help: 'show the menu bar',
handler : function(env) {
$('#menubar-container').show();
events.trigger('resize-header.Page');
env.notebook.menubar = true;
}
},
'hide-menubar':{
help: 'hide the menu bar',
handler : function(env) {
$('#menubar-container').hide();
events.trigger('resize-header.Page');
env.notebook.menubar = false;
}
},
Cheers,
Milos.
--
You received this message because you are subscribed to the Google Groups
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jupyter/0acf4c0d-183d-460e-a13d-9273be1581b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.