Search code examples
javascriptconsolekaggle

In a kaggle notebook, how to show all hidden code cells (Show hidden code) at once?


Follow this notebook as example, is it possible to inject a javascript code into the browser console for all cells to be visible?


Solution

  • On the notebook page, go to the Chrome Console tab (F12) and paste the code below. Invisible cells have the class "sc-jSMfEi imrMBR". The code identifies each one and clicks on them to make them visible.

    list_hiddencode = document.getElementsByClassName("sc-jSMfEi imrMBR");
    for (var i =0; i < list_hiddencode.length; i++){
       list_hiddencode[i].click();
    }