<commit_before>(function(window) {
  manoSeimas = {}
  window.manoSeimas = manoSeimas;

  function ensureSidebarFits() {
    var sidebarInner = $('#middle .sidebar-inner');
    var height = sidebarInner.height() + 20;
    $('#middle .content').css('min-height', height + 'px');
    if (height >= $('#middle').height()) {
      sidebarInner.css('position', 'static');
    }
  }

  $(manoSeimas.ensureSidebarFits);

  function submitPosition(url, node_id, position, callback) {
    var postData = {
      node: "+" + node_id,
      position: position
    };
    $.post(url, postData, callback, 'html');
  };

  manoSeimas.submitPosition = submitPosition;

  function showFractionMPs(fraction) {
    var mps = $('.mpprofile');
    if (fraction === '') {
      mps.show();
    } else {
      var fractionClass = '.fraction-' + fraction;
      mps.not(fractionClass).hide();
      mps.filter(fractionClass).show();
    }
  }

  manoSeimas.showFractionMPs = showFractionMPs;

  function activateFractionFilter(){
    $('#filter-fraction').change(function() {
      showFractionMPs(this.value);
    });

    $('.fraction .description .percent').click(function() {
      $('#result-tabs a[href=#seimo-nariai]').tab('show');
      var slug = $(this).data('slug');
      $('#filter-fraction').val(slug).change();
    });
  }
<commit_msg>results: Fix fraction filter on percent click.<commit_after>(function(window) {
  manoSeimas = {}
  window.manoSeimas = manoSeimas;

  function ensureSidebarFits() {
    var sidebarInner = $('#middle .sidebar-inner');
    var height = sidebarInner.height() + 20;
    $('#middle .content').css('min-height', height + 'px');
    if (height >= $('#middle').height()) {
      sidebarInner.css('position', 'static');
    }
  }

  $(manoSeimas.ensureSidebarFits);

  function submitPosition(url, node_id, position, callback) {
    var postData = {
      node: "+" + node_id,
      position: position
    };
    $.post(url, postData, callback, 'html');
  };

  manoSeimas.submitPosition = submitPosition;

  function showFractionMPs(fraction) {
    var mps = $('.mpprofile');
    if (fraction === '') {
      mps.show();
    } else {
      var fractionClass = '.fraction-' + fraction;
      mps.not(fractionClass).hide();
      mps.filter(fractionClass).show();
    }
  }

  manoSeimas.showFractionMPs = showFractionMPs;

  function activateFractionFilter(){
    $('#filter-fraction').change(function() {
      showFractionMPs(this.value);
    });

    $('.fraction .result-description .percent').click(function() {
      $('#result-tabs a[href=#seimo-nariai]').tab('show');
      var slug = $(this).data('slug');
      $('#filter-fraction').val(slug).change();
    });
  }

{'fraction_non_alphanumeric': 0.18225686711210096, 'fraction_numerical': 0.0014847809948032665, 'mean_word_length': 3.2982456140350878, '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': '953996', 'n_tokens_mistral': 904, 'n_tokens_neox': 853, 'n_words': 148}