`View the original notebook on nbviewer <http://nbviewer.jupyter.org/github/jupyter/notebook/blob/master/docs/source/examples/Notebook/JavaScript%20Notebook%20Extensions.ipynb>`__
<<<<<<< HEAD
Embracing web standards
=======================
@ -27,20 +28,50 @@ interface is fully accessible to the end user and is modifiable live. Even
if this task is not always easy, we strive to keep our code as
accessible and reusable as possible. This should allow us with minimum
effort to develop small extensions that customize the behavior of the
=======
Embracing Web Standards
=======================
One of the main reasons that we developed the current notebook
web application was to embrace web technology.
By being a pure web application using HTML, Javascript and CSS, the
Notebook can usell the web technology improvement for free. Given
browsers support for different media extensions, the notebook web app should
be able to be compatible without modification.
This is also true for the performance of the User Interface as the speed of
javascript VM increases.
The other advantage of using only web technology is that the code of the
interface is fully accessible to the end user and dynamically modifiable . Even
if this task is not always easy, we strive to keep our code as
accessible and reusable as possible. This should allow, with minimum
effort, to develop small extensions that customize the behavior of the
>>>>>>> 4a820e4... superficial english fixes
web interface.
Tampering with Notebook app
---------------------------
<<<<<<< HEAD
<<<<<<< HEAD
The first tool that is available to you and that you should be aware of
are browser "developers tool". The exact naming can change across
=======
The first tools that you should be aware of
are the browser "developers tool". The exact naming can change across
>>>>>>> 4a820e4... superficial english fixes
browser, and might require the installation of extensions. But basically
they can allow you to inspect/modify the DOM, and interact with the
javascript code that run the frontend.
<<<<<<< HEAD
- In Chrome and safari Developer tools are in the menu [Put menu name
in english here]
=======
- In Chrome and safari Developer tools are in the menu "Develop"
>>>>>>> 4a820e4... superficial english fixes
- In firefox you might need to install
=======
The first tool that is availlable to you and that you should be aware of
@ -65,6 +96,7 @@ Injecting JS
Using magics
^^^^^^^^^^^^
<<<<<<< HEAD
<<<<<<< HEAD
Above tools can be tedious to edit long javascript files. Hopefully we
provide the ``%%javascript`` magic. This allows you to quickly inject
@ -83,6 +115,18 @@ notebook by reading file(s) and publishing them into the notebook. Not only does
this often break the flow of the notebook and make the re-execution of
the notebook broken, but it also means that you need to execute those
cells in the entire notebook every time you need to update the code.
=======
The above tools can be tedious to edit long javascipt files. Hopefully we
provide the ``%%javascript`` magic. This allows you to quickly inject
javascript into the notebook. Still the javascript injected this way
will not survive reloading. Hence it is a good tool for testing and
refining a script.
You might see here and there people modifying css and injecting js into
notebook by reading file and publishing them into the notebook. Not only can
this often break the flow of the notebook and break the re-execution, but it also mean that you need to execute those
cells on all the notebook every time you need to update the code.
>>>>>>> 4a820e4... superficial english fixes
This can still be useful in some cases, like the ``%autosave`` magic
that allows to control the time between each save. But this can be
@ -100,10 +144,14 @@ To inject Javascript we provide an entry point: ``custom.js`` that allows
the user to execute and load other resources into the notebook.
Javascript code in ``custom.js`` will be executed when the notebook app
<<<<<<< HEAD
<<<<<<< HEAD
start and can then be used to customize almost anything in the UI and in
=======
starts and can then be used to customise almost anything in the UI and in