anchor.diff:  $(document).ready(function() {
   
     var autoRefreshEnabled = "<%= @auto_refresh %>" === "true";  
  -
  +  var autoRefreshButton = $('#auto_refresh');
  +  
     var setRefreshButtonText = function() {
  -    var button = $('#auto_refresh');
  +    //var button = $('#auto_refresh');
       if (autoRefreshEnabled) {
  -      button.text("<%= t('views.buttons.enable') %>");
  +      autoRefreshButton.text("<%= t('views.buttons.enable') %>");
       } else {
  -      button.text("<%= t('views.buttons.disable') %>");
  +      autoRefreshButton.text("<%= t('views.buttons.disable') %>");
       }    
     };
     
  
positive.code: 
    // The auto_refresh button is a toggle, it shows what will happen if
    // you press it. That is, it displays the opposite of the current state
    $('#auto_refresh').click();
  });
  
  //--></script>
  
negative.code:     }
    });
    
    autoRefreshButton.click(function() {
      autoRefreshEnabled = !autoRefreshEnabled;
      setRefreshButtonText();
    });
  