If you want to do things in the Javascript, that's a notebook extension (aka nbextension) rather than a server extension. You might need a corresponding server extension for your new buttons to talk to (cite2c is an example of an extension that contains both an nbextension and a server extension).
Here's an example of an extension modifying the tree view: http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/nbextensions/tree-filter/readme.html https://github.com/ipython-contrib/jupyter_contrib_nbextensions/blob/master/src/jupyter_contrib_nbextensions/nbextensions/tree-filter/index.js It works the same way as an nbextension modifying the notebook page, but you have to make sure it's enabled for the tree view. Thomas On 29 January 2018 at 09:30, 'Ian Stuart' via Project Jupyter < [email protected]> wrote: > > > On 27 January 2018 at 10:03, Thomas Kluyver <[email protected]> wrote: > >> On 25 January 2018 at 16:50, 'Ian Stuart' via Project Jupyter < >> [email protected]> wrote: >>> >>> 2) Are there any examples of Server extensions I can explore? >>> >> >> Cite2c adds some URL handlers with a server extension: >> https://github.com/takluyver/cite2c/blob/master/cite2c/handlers.py >> > These seem to be handlers within the notebook itself - I'm looking to add > handlers for actions in the _tree_ page (ie, when I user selects a > file/directory, an additional button appears [depending on stuff, which I > need to code] > > The Jupyter code is in here: https://github.com/ > jupyter/jupyter_server/blob/dd4b052403cc0ce70dbde9bfc6c71d > 6b09e814ec/notebook/static/tree/js/notebooklist.js > > >> >> And the docs show the files for a simple server extension: >> http://jupyter-notebook.readthedocs.io/en/stable/examples/ >> Notebook/Distributing%20Jupyter%20Extensions%20as% >> 20Python%20Packages.html#Example---Server-extension >> > Thankee.... > > > -- > Ian > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jupyter/CAKofB1LeB1jRFZh6CFOFBT6KbB_gjAmemEP7_idqjoRJ5zEOdA% > 40mail.gmail.com > <https://groups.google.com/d/msgid/jupyter/CAKofB1LeB1jRFZh6CFOFBT6KbB_gjAmemEP7_idqjoRJ5zEOdA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qh6LkzMiKVrDdKyE3ywWgdVSKJvXvXCjN9dAsMAQ58DbQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
