<commit_before>$('#tocButton').click(function(){
  $('#toc').toggle();
});

var tableOfContents = {

  enable: function(){
    $('#toc').show().css("width", "180px");
    $('#editorcontainer').css("right", "200px");
    $('#editorcontainer').css("width", "auto");
    this.update()
  },

  disable: function(){
    $('#toc').hide();
    $('#editorcontainer').css("width", "100%");

  },

  // Find Tags
  findTags: function(){
    var toc = {}; // The main object we will use
    var tocL = {}; // A per line record of each TOC item
    var count = 0;
    var delims = ["h1","h2","h3","h4","h5","h6",".h1",".h2",".h3",".h4",".h5",".h6"];
    if(clientVars.plugins.plugins.ep_context){
      if(clientVars.plugins.plugins.ep_context.styles){
        var styles = clientVars.plugins.plugins.ep_context.styles;
        $.each(styles, function(k, style){
          var contextStyle = "context"+style.toLowerCase();
          delims.push(contextStyle);
        });
      }
    }
    delims = delims.join(",");
    var hs = $('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").children("div").children(delims);<commit_msg>Fix #11<commit_after>$('#tocButton').click(function(){
  $('#toc').toggle();
});
$('#options-stickychat, #options-chatandusers').change(function(){
  tableOfContents.resize();
});
$('#titlesticky, #titlecross').click(function(){
  tableOfContents.resize();
});

var tableOfContents = {

  enable: function(){
    var width = 180,
        right = 180;
    if ($('#options-stickychat').prop('checked')) {
      width = 372;
      right = 300;
    }
    $('#toc').show().css("width", width+"px");
    $('#editorcontainer').css("right", right+"px");
    this.update()
  },

  disable: function(){
    if ($('#toc:visible').length > 0) {
      $('#toc').hide();
      var right = 0;
      if ($('#options-stickychat').prop('checked')) {
        right = 192;
      }
      $('#editorcontainer').css("right", right+"px");
    }
  },

  resize: function(){
    if ($('#toc:visible').length > 0) {
      this.enable();
    }
  },

  // Find Tags
  findTags: function(){
    var toc = {}; // The main object we will use
    var tocL = {}; // A per line record of each TOC item
    var count = 0;
    var delims = ["h1","h2","h3","h4","h5","h6",".h1",".h2",".h3",".h4",".h5",".h6"];
    if(clientVars.plugins.plugins.ep_context){
      if(clientVars.plugins.plugins.ep_context.styles){
        var styles = clientVars.plugins.plugins.ep_context.styles;
        $.each(styles, function(k, style){
          var contextStyle = "context"+style.toLowerCase();
          delims.push(contextStyle);
        });
      }
    }
    delims = delims.join(",");
    var hs = $('iframe[name="ace_outer"]').contents().find('iframe').contents().find("#innerdocbody").children("div").children(delims);
{'fraction_non_alphanumeric': 0.23142250530785563, 'fraction_numerical': 0.019462137296532202, 'mean_word_length': 3.2575301204819276, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '868495', 'n_tokens_mistral': 953, 'n_tokens_neox': 922, 'n_words': 157}