Files
jupyter_contrib_nbextensions/usability/hide_input_all.js
T
Juergen Hasch bb766f261e Rename extension
Better name for extension as suggested by John Griffiths
2014-03-17 20:10:24 +01:00

38 lines
1.0 KiB
JavaScript

//----------------------------------------------------------------------------
// Copyright (C) 2014 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
// toggle display of all code cells
"using strict";
var toggle_codecells_extension = (function() {
var show=true;
function toggle(){
if (show){
$('div.input').hide();
}else{
$('div.input').show();
}
show = !show;
}
/**
* Add run control buttons to toolbar and initialize codecells
*
*/
IPython.toolbar.add_buttons_group([
{
id : 'toggle_codecells',
label : 'Toggle codecell display',
icon : 'icon-list-alt',
callback : toggle
}
]);
})();