<commit_before>window.onload = function() {
  'use strict';

  window.gdcApp = window.gdcApp || {};

  function _init() {
    var dictionaryContainer = document.getElementById('dictionary-app-container');

    if (! dictionaryContainer ) {
      return;
    }

    var dictionaryPreamble = $('#dictionary-preamble'),
        body = $('body'),
        previousView = null;

    var dictionaryOptions = {
      //dataSourceBaseHost: 'http://localhost:8080',
      afterRenderFn: function(dictionary) {

        var currentView = dictionary.getCurrentViewName();
        var shouldScrollToTop = window.location.hash.indexOf('_top') >= 0;

        if (currentView !== dictionary.CONSTANTS.VIEWS.TABLE.ENTITY_LIST) {
          dictionaryPreamble.hide();

          if (previousView !== currentView) {
            body.scrollTop(0);
          }
        }
        else {
          dictionaryPreamble.show();
        }

        if (shouldScrollToTop) {
          body.scrollTop(0);
        }

        previousView = currentView;

        var accordions = jQuery('.bullets');

        if (accordions.length) {
          accordions.parent().append('<div class="accordion-more-less-toggle" />');

          var bullets = accordions.find('li li');

          if (bullets.length === 0) {
            return;
          }

          var liHeight = bullets.outerHeight(),
              valueHeight = 6 * liHeight;

          accordions.each(function() {
            var $this = $(this);

            if($this.outerHeight() > valueHeight) {
              $this.css({overflow: 'hidden', height: valueHeight});
              $this.parent().find('.accordion-more-less-toggle')
                .css({marginLeft: '2.2rem'})
                .append('<a href="javascript:void(0)" class="more-less-vals"><i class="fa fa-angle-down"></i> More Values</a>');
            }
          })

          jQuery('.more-less-vals').click(function(){
            var $this = $(this);



            if($this.hasClass('more')){
              $this.parent().parent().find('.bullets').css({overflow: 'hidden', height: valueHeight});
              $this.html('<i class="fa fa-angle-down"></i> More Values</a>');
            }
            else {
              $this.parent().parent().find('.bullets').css({overflow: 'visible', height: ''});
              $this.html('<i class="fa fa-angle-up"></i> Less Values</a>');
            }

            $this.toggleClass('more');
          });
        }<commit_msg>* Added more/less anchor titles (accessibility).<commit_after>window.onload = function() {
  'use strict';

  window.gdcApp = window.gdcApp || {};

  function _init() {
    var dictionaryContainer = document.getElementById('dictionary-app-container');

    if (! dictionaryContainer ) {
      return;
    }

    var dictionaryPreamble = $('#dictionary-preamble'),
        body = $('body'),
        previousView = null;

    var dictionaryOptions = {
      //dataSourceBaseHost: 'http://localhost:8080',
      afterRenderFn: function(dictionary) {

        var currentView = dictionary.getCurrentViewName();
        var shouldScrollToTop = window.location.hash.indexOf('_top') >= 0;

        if (currentView !== dictionary.CONSTANTS.VIEWS.TABLE.ENTITY_LIST) {
          dictionaryPreamble.hide();

          if (previousView !== currentView) {
            body.scrollTop(0);
          }
        }
        else {
          dictionaryPreamble.show();
        }

        if (shouldScrollToTop) {
          body.scrollTop(0);
        }

        previousView = currentView;

        var accordions = jQuery('.bullets');

        if (accordions.length) {
          accordions.parent().append('<div class="accordion-more-less-toggle" />');

          var bullets = accordions.find('li li');

          if (bullets.length === 0) {
            return;
          }

          var liHeight = bullets.outerHeight(),
              valueHeight = 6 * liHeight;

          accordions.each(function() {
            var $this = $(this);

            if($this.outerHeight() > valueHeight) {
              $this.css({overflow: 'hidden', height: valueHeight});
              $this.parent().find('.accordion-more-less-toggle')
                .css({marginLeft: '2.2rem'})
                .append('<a href="javascript:void(0)" class="more-less-vals" title="Click to see more values."><i class="fa fa-angle-down"></i> More Values</a>');
            }
          })

          jQuery('.more-less-vals').click(function(){
            var $this = $(this);



            if($this.hasClass('more')){
              $this.parent().parent().find('.bullets').css({overflow: 'hidden', height: valueHeight});
              $this.attr('title', 'Click to see more values.').html('<i class="fa fa-angle-down"></i> More Values</a>');
            }
            else {
              $this.parent().parent().find('.bullets').css({overflow: 'visible', height: ''});
              $this.attr('title', 'Click to see less values.').html('<i class="fa fa-angle-up"></i> Less Values</a>');
            }

            $this.toggleClass('more');
          });
        }
{'fraction_non_alphanumeric': 0.16315685888604606, 'fraction_numerical': 0.004723479629994096, 'mean_word_length': 2.028605482717521, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 29, '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': '2200516', 'n_tokens_mistral': 1459, 'n_tokens_neox': 1374, 'n_words': 248}