<commit_before>(function($){
 
    $.fn.extend({ 
         
        leanModal: function(options) {
 
            var defaults = {
                opacity: 0.5,
                in_duration: 300,
                out_duration: 200,
                ready: undefined,
                complete: undefined
            }
            
            var overlay = $("<div id='lean_overlay'></div>");
            $("body").append(overlay);
          
            // Override defaults
            options =  $.extend(defaults, options);
          
            return this.each(function() {

              // Close Handlers
              $(this).click(function(e) {
              var modal_id = $(this).attr("href");
              $("#lean_overlay").click(function() { 
                   close_modal(modal_id);                    
              });

              $(modal_id).find('.modal_close').click(function(e) { 
                  e.preventDefault();
                  close_modal(modal_id);            
              });


              $('#lean_overlay').css({ display : 'block', opacity : 0 });

              $(modal_id).css({ 
                display : 'block',
                top: '4%',
                opacity: 0
              });


              $('#lean_overlay').velocity({opacity: options.opacity}, {duration: options.in_duration, queue: false, ease: 'easeOutCubic'});

              $(modal_id).velocity({top: '10%', opacity: 1},
                {
                  duration: options.in_duration,
                  queue: false,
                  ease: 'easeOutCubic',
                  // Handle modal ready callback
                  complete: function() {
                    if (typeof(options.ready) === 'function')
                      options.ready();
                  }
                }
              );

              e.preventDefault();

              });

          });

          function close_modal(modal_id){
              $("#lean_overlay").velocity( { opacity: 0}, {duration: options.out_duration, queue: false, ease: 'easeOutQuart'});
              $(modal_id).fadeOut(options.out_duration, function() {
                  $(this).css({ top: 0});
                  $("#lean_overlay").css({display:'none'});

                  // Call complete callback
                  if (typeof(options.complete) === 'function')
                    options.complete();
              });



			}
        }
    });
     
})(jQuery);<commit_msg>Cleanup leanModal.js<commit_after>(function($) {
  $.fn.extend({
    leanModal: function(options) {
      var defaults = {
        opacity: 0.5,
        in_duration: 300,
        out_duration: 200,
        ready: undefined,
        complete: undefined
      }

      var overlay = $("<div id='lean_overlay'></div>");
      $("body").append(overlay);

      // Override defaults
      options =  $.extend(defaults, options);

      return this.each(function() {
        // Close Handlers
        $(this).click(function(e) {
          var modal_id = $(this).attr("href");
          $("#lean_overlay").click(function() {
            close_modal(modal_id);
          });

          $(modal_id).find(".modal_close").click(function(e) {
            e.preventDefault();
            close_modal(modal_id);
          });


          $("#lean_overlay").css({ display : "block", opacity : 0 });

          $(modal_id).css({
            display : "block",
            top: "4%",
            opacity: 0
          });


          $("#lean_overlay").velocity({opacity: options.opacity}, {duration: options.in_duration, queue: false, ease: "easeOutCubic"});

          $(modal_id).velocity({top: "10%", opacity: 1}, {
            duration: options.in_duration,
            queue: false,
            ease: "easeOutCubic",
            // Handle modal ready callback
            complete: function() {
              if (typeof(options.ready) === "function") {
                options.ready();
              }
            }
          });

          e.preventDefault();
        });
      });

      function close_modal(modal_id) {
        $("#lean_overlay").velocity( { opacity: 0}, {duration: options.out_duration, queue: false, ease: "easeOutQuart"});
        $(modal_id).fadeOut(options.out_duration, function() {
          $(this).css({ top: 0});
          $("#lean_overlay").css({display:"none"});

          // Call complete callback
          if (typeof(options.complete) === "function") {
            options.complete();
          }
        });
      }
    }
  });
})(jQuery);
{'fraction_non_alphanumeric': 0.1512400354295837, 'fraction_numerical': 0.0070859167404783, 'mean_word_length': 1.4258861439312567, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6294235', 'n_tokens_mistral': 1232, 'n_tokens_neox': 1154, 'n_words': 210}