Closed kwon14 closed 4 years ago
Using custom.js
is only for the classic Jupyter Notebook. For JupyterLab, currently, you need to write an JupyterLab extension. See the tutorial at https://jupyterlab.readthedocs.io/en/stable/developer/extension_tutorial.html for a generic tutorial, and https://github.com/jupyterlab/extension-examples for many more examples. For your specific case, you could modify the Astronomy Picture of the Day example to add the widget to the sidebar, changing app.shell.add(widget, 'main');
to app.shell.add(widget, 'right');
thx for answer me :)
Hi.
Thank you for your hard work.
I'm using notebook and jupyterlab that the version is as follows. 'notebook=6.1.4' 'jupyterlab=2.2.8'
There are many other extensions in use.
I want to add a button on the left sidebar of Jupyterlab using custom.js. The referenced material was applied by looking at the guide below.
https://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/JavaScript%20Notebook%20Extensions.html#custom.js
To test with Exercise, after inserting the alert("hello world from custom.js") code in custom.js at the top, I restarted Jupyterlab Didn't work. https://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/JavaScript%20Notebook%20Extensions.html#Exercise-:
Ask where you need to look for custom.js to work.
Please answer, and always thank you.