11import {
22 JupyterFrontEnd ,
3- JupyterFrontEndPlugin ,
3+ JupyterFrontEndPlugin
44} from '@jupyterlab/application' ;
55
66import { IDisposable , DisposableDelegate } from '@lumino/disposable' ;
@@ -14,7 +14,7 @@ import { DocumentRegistry } from '@jupyterlab/docregistry';
1414import {
1515 NotebookActions ,
1616 NotebookPanel ,
17- INotebookModel ,
17+ INotebookModel
1818} from '@jupyterlab/notebook' ;
1919
2020import '../style/index.css' ;
@@ -28,7 +28,7 @@ const extension: JupyterFrontEndPlugin<void> = {
2828 activate : ( app : JupyterFrontEnd ) => {
2929 app . docRegistry . addWidgetExtension ( 'Notebook' , new ButtonExtension ( ) ) ;
3030 console . log ( 'JupyterLab extension jupyterlab-hide-code is activated!' ) ;
31- } ,
31+ }
3232} ;
3333
3434export class ButtonExtension
@@ -41,7 +41,7 @@ export class ButtonExtension
4141 const hideInputCode = ( ) => {
4242 NotebookActions . runAll ( panel . content , context . sessionContext ) ;
4343
44- panel . content . widgets . forEach ( ( cell ) => {
44+ panel . content . widgets . forEach ( cell => {
4545 if ( cell . model . type === 'code' ) {
4646 const layout = cell . layout as PanelLayout ;
4747 layout . widgets [ 1 ] . hide ( ) ;
@@ -51,7 +51,7 @@ export class ButtonExtension
5151 buttonShowInput . show ( ) ;
5252 } ;
5353 const showInputCode = ( ) => {
54- panel . content . widgets . forEach ( ( cell ) => {
54+ panel . content . widgets . forEach ( cell => {
5555 if ( cell . model . type === 'code' ) {
5656 const layout = cell . layout as PanelLayout ;
5757 layout . widgets [ 1 ] . show ( ) ;
@@ -66,14 +66,14 @@ export class ButtonExtension
6666 className : 'myButton' ,
6767 iconClass : 'fa fa-sm fa-eye-slash fontawesome-colors' ,
6868 onClick : hideInputCode ,
69- tooltip : 'Hide Input' ,
69+ tooltip : 'Hide Input'
7070 } ) ;
7171
7272 const buttonShowInput = new ToolbarButton ( {
7373 className : 'myButton' ,
7474 iconClass : 'fa fa-sm fa-eye fontawesome-colors' ,
7575 onClick : showInputCode ,
76- tooltip : 'Show Input' ,
76+ tooltip : 'Show Input'
7777 } ) ;
7878
7979 buttonShowInput . hide ( ) ;
0 commit comments