Created
May 28, 2015 23:46
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#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