<commit_before>// Fluidbox
// Description: Replicating the seamless lightbox transition effect seen on Medium.com, with some improvements
// Version: 1.2
// Author: <NAME>
// Author URI: http://terrymun.com
(function(a){a.fn.fluidbox=function(f){var e=a.extend({viewportFill:0.95,closeTrigger:[{selector:"#fluidbox-overlay",event:"click"}]},f);a("body").append('<div id="fluidbox-overlay" />');var d=this,g=a(window),c,b=function(){a(".fluidbox-opened").trigger("click")},h=function(l){var j=l.find("img"),k=l.find(".fluidbox-ghost"),n=g.scrollTop()-j.offset().top+0.5*(j.data("imgHeight")*(j.data("imgScale")-1))+0.5*(g.height()-j.data("imgHeight")*j.data("imgScale")),i=0.5*(j.data("imgWidth")*(j.data("imgScale")-1))+0.5*(g.width()-j.data("imgWidth")*j.data("imgScale"))-j.offset().left,m=j.data("imgScale");k.css({transform:"translate("+i+"px,"+n+"px) scale("+m+")"})};if(e.closeTrigger){a.each(e.closeTrigger,function(j){if(e.closeTrigger[j].selector!="window"){a(document).on(e.closeTrigger[j].event,e.closeTrigger[j].selector,b)}else{g.on(e.closeTrigger[j].event,b)}})}d.imagesLoaded().done(function(){d.each(function(){if(a(this).children().length===1&&a(this).children("img").length===1){a(this).addClass("fluidbox").wrapInner('<div class="fluidbox-wrap" />').find("img").css({opacity:1}).after('<div class="fluidbox-ghost" />')}});a(window).resize(function(){c=g.width()/g.height();d.each(function(){var k=a(this).find("img"),l=a(this).find(".fluidbox-ghost"),j=a(this).find(".fluidbox-wrap"),m=k.data();m.imgWidth=k.width();m.imgHeight=k.height();m.imgRatio=k.width()/k.height();l.css({width:k.width(),height:k.height(),top:k.offset().top-j.offset().top,left:k.offset().left-j.offset().left});if(c>m.imgRatio){m.imgScale=a(window).height()*e.viewportFill/k.height()}else{m.imgScale=a(window).width()*e.viewportFill/k.width()}});var i=a("a[data-fluidbox].fluidbox-opened");if(i.length>0){h(i)}}).resize();d.click(function(m){var l=a(this),j=a(this).find("img"),k=a(this).find(".fluidbox-ghost");if(a(this).data("fluidbox-state")===0||!a(this).data("fluidbox-state")){a(this).data("fluidbox-state",1).removeClass("fluidbox-closed").addClass("fluidbox-opened");a("#fluidbox-overlay").fadeIn();k.css({"background-image":"url("+j.attr("src")+")",opacity:1});j.css({opacity:0});var i=new Image();i.onload=function(){k.css({"background-image":"url("+l.attr("href")+")"})};i.src=a(this).attr("href");h(a(this))}else{a(this).data("fluidbox-state",0).removeClass("fluidbox-opened").addClass("fluidbox-closed");a("#fluidbox-overlay").fadeOut();j.css({opacity:1});k.css({transform:"translate(0,0) scale(1)"}).one("webkitTransitionEnd MSTransitionEnd oTransitionEnd otransitionend transitionend",function(){k.css({opacity:0})})}m.preventDefault()})});return d}})(jQuery);<commit_msg>Updated minified version of jQuery plugin<commit_after>// Fluidbox
// Description: Replicating the seamless lightbox transition effect seen on Medium.com, with some improvements
// Version: 1.2
// Author: <NAME>
// Author URI: http://terrymun.com
(function(a){a.fn.fluidbox=function(f){var e=a.extend(true,{viewportFill:0.95,closeTrigger:[{selector:"#fluidbox-overlay",event:"click"}]},f);a("body").append('<div id="fluidbox-overlay" />');var d=this,g=a(window),c,b=function(){a(".fluidbox-opened").trigger("click")},h=function(l){var j=l.find("img"),k=l.find(".fluidbox-ghost"),n=g.scrollTop()-j.offset().top+0.5*(j.data("imgHeight")*(j.data("imgScale")-1))+0.5*(g.height()-j.data("imgHeight")*j.data("imgScale")),i=0.5*(j.data("imgWidth")*(j.data("imgScale")-1))+0.5*(g.width()-j.data("imgWidth")*j.data("imgScale"))-j.offset().left,m=j.data("imgScale");k.css({transform:"translate("+i+"px,"+n+"px) scale("+m+")"})};if(e.closeTrigger){a.each(e.closeTrigger,function(j){if(e.closeTrigger[j].selector!="window"){a(document).on(e.closeTrigger[j].event,e.closeTrigger[j].selector,b)}else{g.on(e.closeTrigger[j].event,b)}})}d.imagesLoaded().done(function(){d.each(function(){if(a(this).is("a")&&a(this).children().length===1&&a(this).children().is("img")){a(this).addClass("fluidbox").wrapInner('<div class="fluidbox-wrap" />').find("img").css({opacity:1}).after('<div class="fluidbox-ghost" />')}});a(window).resize(function(){c=g.width()/g.height();d.each(function(){var k=a(this).find("img"),l=a(this).find(".fluidbox-ghost"),j=a(this).find(".fluidbox-wrap"),m=k.data();m.imgWidth=k.width();m.imgHeight=k.height();m.imgRatio=k.width()/k.height();l.css({width:k.width(),height:k.height(),top:k.offset().top-j.offset().top,left:k.offset().left-j.offset().left});if(c>m.imgRatio){m.imgScale=g.height()*e.viewportFill/k.height()}else{m.imgScale=g.width()*e.viewportFill/k.width()}});var i=a("a[data-fluidbox].fluidbox-opened");if(i.length>0){h(i)}}).resize();d.click(function(m){var l=a(this),j=a(this).find("img"),k=a(this).find(".fluidbox-ghost");if(a(this).data("fluidbox-state")===0||!a(this).data("fluidbox-state")){a(this).data("fluidbox-state",1).removeClass("fluidbox-closed").addClass("fluidbox-opened");a("#fluidbox-overlay").fadeIn();k.css({"background-image":"url("+j.attr("src")+")",opacity:1});j.css({opacity:0});var i=new Image();i.onload=function(){k.css({"background-image":"url("+l.attr("href")+")"})};i.src=a(this).attr("href");h(a(this))}else{a(this).data("fluidbox-state",0).removeClass("fluidbox-opened").addClass("fluidbox-closed");a("#fluidbox-overlay").fadeOut();j.css({opacity:1});k.css({transform:"translate(0,0) scale(1)"}).one("webkitTransitionEnd MSTransitionEnd oTransitionEnd otransitionend transitionend",function(){k.css({opacity:0})})}m.preventDefault()})});return d}})(jQuery);
{'fraction_non_alphanumeric': 0.2917710196779964, 'fraction_numerical': 0.010196779964221825, 'mean_word_length': 11.342163355408388, 'pattern_counts': {'":': 4, '<': 11, '<?xml version=': 0, '>': 15, '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': '6777367', 'n_tokens_mistral': 2158, 'n_tokens_neox': 2090, 'n_words': 92}