var ast = function (element, IPython) {
    "use strict";
    var label = $('<label/>').text('Autosave interval (min):');
    var select = $('<select/>')
         .addClass('ui-widget-content')
         .append($('<option/>').attr('value', '2').text('2 (default)'))
         .append($('<option/>').attr('value', '0').text('autosave off'))
    
    element.append(label).append(select);
    select.change(function() {
         var val = $(this).val()
         console.log('change val');
         IPython.notebook.set_autosave_interval(parseInt(val)*60*1000)
    });
    var thresholds = [2,5,10,15,20,30,60];

    for (var i=0; i<thresholds.length; i++) {
         var thr = thresholds[i];
         select.append($('<option/>').attr('value', thr).text(thr));
    }

    console.log('foo');
    $([IPython.events]).on("autosave_enabled.Notebook", 
            function(event,value){
               select.val(parseInt(value/60/1000)) 
            });

    console.log('autosave time selector loaded');
};

console.log('repas')
ast(IPython.toolbar.element, IPython)
console.log('awmfiuvb');




@@ -762,32 +762,8 @@
  %7D%0A%0A
-    console.log('foo');%0A
     
@@ -923,82 +923,11 @@
 );%0A%0A
-    console.log('autosave time selector loaded');%0A%7D;%0A%0Aconsole.log('repas')
+%7D;%0A
 %0Aast
@@ -965,32 +965,7 @@
 on)%0A
-console.log('awmfiuvb');%0A
 %0A%0A%0A

remove debug