Skip to content

Commit

Permalink
fix the link check
Browse files Browse the repository at this point in the history
  • Loading branch information
dou-du committed Aug 3, 2022
1 parent 79b20c5 commit 94d9e21
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ extension from Aachen (Aix) Virtual Platform for Materials Processing.

## Requirements

* JupyterLab >= 3.0

- JupyterLab >= 3.0

## Install

Expand Down Expand Up @@ -64,4 +63,3 @@ jupyter lab --watch
We acknowledge support from the EPFL Open Science Fund via the [OSSCAR](http://www.osscar.org) project.

<img src='https://www.osscar.org/_images/logos.png' width='700'>

14 changes: 7 additions & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
JupyterFrontEnd,
JupyterFrontEndPlugin,
JupyterFrontEndPlugin
} from '@jupyterlab/application';

import { IDisposable, DisposableDelegate } from '@lumino/disposable';
Expand All @@ -14,7 +14,7 @@ import { DocumentRegistry } from '@jupyterlab/docregistry';
import {
NotebookActions,
NotebookPanel,
INotebookModel,
INotebookModel
} from '@jupyterlab/notebook';

import '../style/index.css';
Expand All @@ -28,7 +28,7 @@ const extension: JupyterFrontEndPlugin<void> = {
activate: (app: JupyterFrontEnd) => {
app.docRegistry.addWidgetExtension('Notebook', new ButtonExtension());
console.log('JupyterLab extension jupyterlab-hide-code is activated!');
},
}
};

export class ButtonExtension
Expand All @@ -41,7 +41,7 @@ export class ButtonExtension
const hideInputCode = () => {
NotebookActions.runAll(panel.content, context.sessionContext);

panel.content.widgets.forEach((cell) => {
panel.content.widgets.forEach(cell => {
if (cell.model.type === 'code') {
const layout = cell.layout as PanelLayout;
layout.widgets[1].hide();
Expand All @@ -51,7 +51,7 @@ export class ButtonExtension
buttonShowInput.show();
};
const showInputCode = () => {
panel.content.widgets.forEach((cell) => {
panel.content.widgets.forEach(cell => {
if (cell.model.type === 'code') {
const layout = cell.layout as PanelLayout;
layout.widgets[1].show();
Expand All @@ -66,14 +66,14 @@ export class ButtonExtension
className: 'myButton',
iconClass: 'fa fa-sm fa-eye-slash fontawesome-colors',
onClick: hideInputCode,
tooltip: 'Hide Input',
tooltip: 'Hide Input'
});

const buttonShowInput = new ToolbarButton({
className: 'myButton',
iconClass: 'fa fa-sm fa-eye fontawesome-colors',
onClick: showInputCode,
tooltip: 'Show Input',
tooltip: 'Show Input'
});

buttonShowInput.hide();
Expand Down
4 changes: 3 additions & 1 deletion ui-tests/tests/jupyterlab_hide_code.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ test('should emit an activation console message', async ({ page }) => {
await page.goto();

expect(
logs.filter(s => s === 'JupyterLab extension jupyterlab-hide-code is activated!')
logs.filter(
s => s === 'JupyterLab extension jupyterlab-hide-code is activated!'
)
).toHaveLength(1);
});

0 comments on commit 94d9e21

Please sign in to comment.