[IPython-dev] Adding custom JavaScript code

Doug Blank doug.blank at gmail.com
Wed Mar 5 07:10:42 EST 2014


On Wed, Mar 5, 2014 at 7:02 AM, Konrad Hinsen
<konrad.hinsen at fastmail.net> wrote:
> Hi everyone,
>
> I am trying to add JavaScript code to the file static/custom/custom.js
> in my profile.  As a first test, I simply uncommented the "custom
> button" example.  That makes no difference at all. I tried other
> additions, and made some explorations in the Browser console, which
> all led me to conclude that custom.js is not used at all.
>
> I have only one profile (the default one), so I am rather sure I am
> not using a wrong one.
>
> Pretty much everything I find about this subject on the Web is for
> IPython 1.x. Is custom.js still supposed to work with 2.x?
> Does anyone have a working example? Or ideas for debugging this?

Others will no doubt have detailed help, but here is an example (the
drag and drop images on a notebook) that works with IPython 2.0:

https://bitbucket.org/ipre/calico/src/master/notebooks/profile/static/custom/custom.js#cl-52

We copy all of those files into new profiles and works fine.

As for debugging, I use the Chrome developer tools (right-click on
page, inspect element; select Console tab) to see errors in loading.

-Doug

> Konrad.
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



More information about the IPython-dev mailing list