<commit_before>define([
    'jquery',
    'backbone',
    'text!templates/root/siteBox.html'
], function($, Backbone, siteBoxTemplate) {

    var SiteBox = Backbone.View.extend({

  template: siteBoxTemplate,

  initialize: function(options) {
      this.name = options.name;
      this.collection.bind('reset', this.render, this);
  },

  render: function(event) {
      var html = _.template(this.template,
          {quotes: this.collection.pluck('content').slice(0,3),
           name: this.name,
           id: this.id
          });

      this.$el.removeClass('loader')
        .hide()
        .html(html)
        .fadeIn('slow')
        .css('overflow', 'scroll');

      /*
       * Remove quotes until the dynamically added div.site-box height
       * is lower than 440px to ensure height consistency between
       * all .site-box divs
       */
      while (this.el.scrollHeight > (this.$el.height() + 2 * parseInt(this.$el.css('padding-top'), 10))) {
          this.$el.find('p, hr').not('.view-more').last().remove();
      }

      this.$el.css('overflow', 'hidden');

      return this;
  }

    });

    return SiteBox;
});<commit_msg>use jQuery.innerHeight()<commit_after>define([
    'jquery',
    'backbone',
    'text!templates/root/siteBox.html'
], function($, Backbone, siteBoxTemplate) {

    var SiteBox = Backbone.View.extend({

  template: siteBoxTemplate,

  initialize: function(options) {
      this.name = options.name;
      this.collection.bind('reset', this.render, this);
  },

  render: function(event) {
      var html = _.template(this.template,
          {quotes: this.collection.pluck('content').slice(0,3),
           name: this.name,
           id: this.id
          });

      this.$el.removeClass('loader')
        .hide()
        .html(html)
        .fadeIn('slow')
        .css('overflow', 'scroll');

      /*
       * Remove quotes until the dynamically added div.site-box height
       * is lower than 440px to ensure height consistency between
       * all .site-box divs
       */
      while (this.el.scrollHeight > this.$el.innerHeight()) {
          this.$el.find('p, hr').not('.view-more').last().remove();
      }

      this.$el.css('overflow', 'hidden');

      return this;
  }

    });

    return SiteBox;
});
{'fraction_non_alphanumeric': 0.16123348017621145, 'fraction_numerical': 0.005726872246696035, 'mean_word_length': 2.3056768558951966, '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': '3592030', 'n_tokens_mistral': 712, 'n_tokens_neox': 679, 'n_words': 138}