Skip to content

Instantly share code, notes, and snippets.

@dela3499
Created May 28, 2015 23:46
Show Gist options
  • Save dela3499/eba7782c8e7e12b8175a to your computer and use it in GitHub Desktop.
Save dela3499/eba7782c8e7e12b8175a to your computer and use it in GitHub Desktop.
To add a 'results only' toggle button to your IPython notebook, add the snippet below to the file ~/.ipython/profile_default/static/custom/custom.js
$('#menus .navbar-collapse').append($("<button id='results' class='btn btn-default navbar-btn' onclick='exec_code()'>Results Only</button>"));
function exec_code(){
$('#results').text(function(i, text){
return text === "Results Only" ? "Show All" : "Results Only";
})
$('.code_cell .input').toggle();
$('.code_cell .output .output_stderr').toggle();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment