<commit_before>$.fn.microtip = function(options) {  
  
  var defaults = {
    bg: true,
    attr: 'title',
    position: 'bottom',
    width: '',
    minWidth: 100,
    maxWidth: 175,
    textColor: '',
    offset: 8
  };
  
  var options = $.extend(defaults, options); 
  
  return this.each(function() {
    var el = $(this);
    var tipCSS = {
      'width': options.width != '' ? options.width + 'px' : '',
      'min-width': options.minWidth + "px",
      'max-width': options.maxWidth != "none" ? options.maxWidth + 'px' : '',
      'color': options.textColor.length ? options.textColor : ''
    };
    
    el
      .mouseenter(function() {
        var tip;
        if (el.hasClass("microtip-processed")) {
          tip = el.siblings("span.microtip-tip");
        }
        else {
          tip = $("<span></span>").addClass("microtip-tip").css(tipCSS);
          if (options.bg) {
            tip.addClass('bg');
          }
          var elDim = { "x": el.width(), "y": el.height() };
          tip.html(el.attr(options.attr));
          if (options.attr == "title") {
            el.attr("title", "");
          }
          el.wrap("<div/>").parent().css("position", "relative").append(tip);
          tip.css({
            bottom : options.position == "top" ? elDim.y + options.offset : (tip.outerHeight() + options.offset) * -1,
            left: Math.floor(elDim.x / 2) - Math.floor(tip.outerWidth() / 2),
          });
          tip.css({ display: "none", opacity: 1 });
          el.addClass("microtip-processed");
        }
        el.data("microtip-visible", true);
        tip.show();
      })
      .mouseleave(function() {
        el.data("microtip-visible", false);
        el.siblings("span.microtip-tip").hide();
      });
  });  
}; <commit_msg>Removed unused code.<commit_after>$.fn.microtip = function(options) {  
  
  var defaults = {
    bg: true,
    attr: 'title',
    position: 'bottom',
    width: '',
    minWidth: 100,
    maxWidth: 175,
    textColor: '',
    offset: 8
  };
  
  var options = $.extend(defaults, options); 
  
  return this.each(function() {
    var el = $(this);
    var tipCSS = {
      'width': options.width != '' ? options.width + 'px' : '',
      'min-width': options.minWidth + "px",
      'max-width': options.maxWidth != "none" ? options.maxWidth + 'px' : '',
      'color': options.textColor.length ? options.textColor : ''
    };
    
    el
      .mouseenter(function() {
        var tip;
        if (el.hasClass("microtip-processed")) {
          tip = el.siblings("span.microtip-tip");
        }
        else {
          tip = $("<span></span>").addClass("microtip-tip").css(tipCSS);
          if (options.bg) {
            tip.addClass('bg');
          }
          var elDim = { "x": el.width(), "y": el.height() };
          tip.html(el.attr(options.attr));
          if (options.attr == "title") {
            el.attr("title", "");
          }
          el.wrap("<div/>").parent().css("position", "relative").append(tip);
          tip.css({
            bottom : options.position == "top" ? elDim.y + options.offset : (tip.outerHeight() + options.offset) * -1,
            left: Math.floor(elDim.x / 2) - Math.floor(tip.outerWidth() / 2),
          });
          tip.css({ display: "none", opacity: 1 });
          el.addClass("microtip-processed");
        }
        tip.show();
      })
      .mouseleave(function() {
        el.siblings("span.microtip-tip").hide();
      });
  });  
}; 
{'fraction_non_alphanumeric': 0.19381860196418255, 'fraction_numerical': 0.006354708261120739, 'mean_word_length': 1.9397283531409168, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 9, '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': '7176389', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1098, 'n_words': 194}