<commit_before>
$.declare('modal', {
  defaults: {
    modalClass: 'modal',
    backdropClass: 'modal-backdrop',
    backdropClick: true
  },

  init: function() {

    if ($('.modal').length !== 0) {
      $('.modal').modal('hide');
    }

    this.show();
    if (this.backdropClick) {
      this.getBackdrop().on('click', this.proxy(this.hide));
    }
  },

  getBackdrop: function() {
    return $('.'+this.backdropClass);
  },

  showBackdrop: function() {
    this.hideBackdrop();
    var el = $('<div/>').addClass(this.backdropClass);
    $('body').append(el);
  },

  hideBackdrop: function() {
    this.getBackdrop().remove();
  },

  show: function() {
    this.el.addClass(this.modalClass);
    $('body').css('overflow', 'hidden');
    this.showBackdrop();
    this.el.show();
    this.emit('show');
  },

  hide: function() {
    this.el.removeClass(this.modalClass);
    $('body').css('overflow', '');
    this.hideBackdrop();
    this.el.hide();
    this.emit('hide');
    this.el.removeData('modal');
  }
});<commit_msg>[lib] wrapped $ in jquery call<commit_after>
(function($) {
  $.declare('modal', {
    defaults: {
      modalClass: 'modal',
      backdropClass: 'modal-backdrop',
      backdropClick: true
    },

    init: function() {

      if ($('.modal').length !== 0) {
        $('.modal').modal('hide');
      }

      this.show();
      if (this.backdropClick) {
        this.getBackdrop().on('click', this.proxy(this.hide));
      }
    },

    getBackdrop: function() {
      return $('.'+this.backdropClass);
    },

    showBackdrop: function() {
      this.hideBackdrop();
      var el = $('<div/>').addClass(this.backdropClass);
      $('body').append(el);
    },

    hideBackdrop: function() {
      this.getBackdrop().remove();
    },

    show: function() {
      this.el.addClass(this.modalClass);
      $('body').css('overflow', 'hidden');
      this.showBackdrop();
      this.el.show();
      this.emit('show');
    },

    hide: function() {
      this.el.removeClass(this.modalClass);
      $('body').css('overflow', '');
      this.hideBackdrop();
      this.el.hide();
      this.emit('hide');
      this.el.removeData('modal');
    }
  });
})(jQuery);
{'fraction_non_alphanumeric': 0.21610555050045496, 'fraction_numerical': 0.0009099181073703367, 'mean_word_length': 2.646766169154229, 'pattern_counts': {'":': 0, '<': 5, '<?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': '464829', 'n_tokens_mistral': 746, 'n_tokens_neox': 722, 'n_words': 106}