[IPython-dev] toggle cell input - changed in dev version?

Damián Avila damianavila at gmail.com
Mon Mar 17 12:10:21 EDT 2014


It seems to be the new Sanitizer (google caja), but first let me know the
output of the console where you launch the IPython notebook...


2014-03-17 12:17 GMT-03:00 John Griffiths <j.davidgriffiths at gmail.com>:

>
> Ok perhaps some useful info here. When I 'run' (shift-enter) the markdown
> cell in google chrome, this pops up:
>
> HTML Sanitizer script removed Object {change: "removed", tagName:
> "script"} security.js?v=e9cf1cd9e6335aeaf3d0c366765ad26d:93
> HTML Sanitizer a.href removed Object {change: "removed", tagName: "a",
> attribName: "href", oldValue: "javascript:toggle()", newValue: null}
> security.js?v=e9cf1cd9e6335aeaf3d0c366765ad26d:93
> HTML Sanitizer a.target removed Object {change: "removed", tagName: "a",
> attribName: "target", oldValue: "_self", newValue: null}
> security.js?v=e9cf1cd9e6335aeaf3d0c366765ad26d:93
>
> This means very little to me (first time I've ever intentionally opened a
> browser javascript console).  Any ideas?
>
>
> Ta.
>
>
>
>
>
> On 17 March 2014 14:29, Damián Avila <damianavila at gmail.com> wrote:
>
>> Working for me in last master... any message in the js console... or in
>> the console starting the notebook?
>>
>>
>> 2014-03-17 11:01 GMT-03:00 John Griffiths <j.davidgriffiths at gmail.com>:
>>
>>>
>>>  I've been making use of a little piece of javascript in a markdown
>>> cell that hides all code cells in the notebook;
>>>
>>>  <script type="text/javascript">
>>>      show=true;
>>>      function toggle(){
>>>          if (show){
>>>              $('div.input').hide();
>>>          }else{
>>>              $('div.input').show();
>>>          }
>>>          show = !show
>>>      }
>>>  </script>
>>>  <a href="javascript:toggle()" target="_self">toggle input</a>
>>>
>>> (e.g. see here
>>> http://python.6.x6.nabble.com/IPython-User-Hide-code-cells-in-the-notebook-td4997151.html)
>>>
>>>
>>> However, I recently installed the latest ipython dev version, and now
>>> this snippet doesn't seem to be working any more.
>>>
>>> Any obvious reasons for this?
>>>
>>> Ta,
>>>
>>> john
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Mr. John Griffiths, MSc
>>>
>>> PhD Candidate
>>>
>>> Centre for Speech, Language, and the Brain
>>>
>>> Department of Experimental Psychology
>>>
>>> University of Cambridge, UK
>>>
>>> _______________________________________________
>>> IPython-dev mailing list
>>> IPython-dev at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>>
>>>
>>
>>
>> --
>> Damián Avila
>> Scientific Python Developer
>> Quantitative Finance Analyst
>> Statistics, Biostatistics and Econometrics Consultant
>> Biochemist
>>
>> _______________________________________________
>> IPython-dev mailing list
>> IPython-dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-dev
>>
>>
>
>
> --
>
> Mr. John Griffiths, MSc
>
> PhD Candidate
>
> Centre for Speech, Language, and the Brain
>
> Department of Experimental Psychology
>
> University of Cambridge, UK
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>


-- 
Damián Avila
Scientific Python Developer
Quantitative Finance Analyst
Statistics, Biostatistics and Econometrics Consultant
Biochemist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140317/7d338bf8/attachment.html>


More information about the IPython-dev mailing list