[IPython-dev] Github - IPy Notebook button

Bartosz mail at telenczuk.pl
Mon Jul 1 08:10:26 EDT 2013

Hi Puneeth,

Indeed, it is similar to my userscript. However, I prefer to render the 
notebook on a separate page - leaves more space for graphs.

One additional points - your script is triggered only on reload (at 
least in my case). It means that when you choose a file from GH file 
browser, it won't be automatically render. The problem is that the 
clicking triggers an AJAX request. The workaround is to trigger on a DOM 
change event as implemented in my script.

@Fernando: Do you think one of the scripts could be linked on NbViewer 
page? I could also write a short "instructions" for it.



On 06/28/2013 09:29 PM, Puneeth Chaganti wrote:
> Hi,
> I hadn't really looked at this Userscript, until I wanted to send this
> email.  It may have saved me some work.
> I've hacked up a userscript[0] that "renders" notebook files inside
> GitHub, inspired by this[1] post on GitHub's blog, about rendering
> geojson files.
> I started with a version that loaded all the required Notebook js
> files, and got something working (just for raw pages), but getting the
> right CSS would've been a pain.  After some poking around, I wrote a
> userscript to replace the required elements on the page with an iframe
> that renders the corresponding nbviewer url.  Some of you may find it
> useful, though it probably doesn't save you much more than a click or
> two. :)
> The script can be installed in Firefox using Greasemonkey, and in
> Chrom(ium|e) using Tampermonkey.
> [0] - https://gist.github.com/punchagan/5882879
> [1] -https://github.com/blog/1541-geojson-rendering-improvements
> --
> Puneeth
> _______________________________________________
> 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