<commit_before>/* global hljs, $, console */
/* jshint browser: true */

/*******************
 * HIGHLIGHT CODE  *
 *******************/
if($("code").length != 0){
    $.getScript("/assets/js/helper/highlight.min.js", function() { 
        hljs.initHighlightingOnLoad();
    });
}

/**********************
 * RESPONSIVE VIDEOS  *
 **********************/

$.getScript("/assets/js/helper/jquery.fitvids.js", function() { 
    $("#main").fitVids();
});

/************
 * GALLERY  *
 ************/

if($(".gallery").length != 0){ // If there is a gallery present.
    $.getScript("/assets/js/helper/imagesloaded.pkgd.min.js", function() { 
        $(".gallery").imagesLoaded(gallery);
        $(window).resize(gallery);
    });
}

function gallery(){
    $.getScript("/assets/js/helper/gallery.min.js", function() { // Load in script for gallery
        var size = 0;
        if ($(window).height() > $(window).width()){
            size = $(window).height();
        } else {
            size = $(window).width();
        }
        if (size < 210 ){
            size = 210;
        }
        $('.gallery').removeWhitespace().collagePlus(
            {
                'targetHeight':size/5
            }
        );
    });
}

/**********************
 * FULL WIDTH IMAGES  *
 **********************/
    
$.getScript("/assets/js/helper/imagesloaded.pkgd.min.js", function() { 
    function fullImage(){
        $('img[src$="#full"]').each(function() {
            $(this).addClass("full-loaded");
            $(this).closest("p").css("min-height",$(this).height());
            $(this).closest("p").addClass("full-image-container");
        });
    }
    $("#main").imagesLoaded(fullImage);
    $(window).resize(fullImage);
});<commit_msg>#fragments are now ignored inside a gallery<commit_after>/* global hljs, $, console */
/* jshint browser: true */

/*******************
 * HIGHLIGHT CODE  *
 *******************/
if($("code").length != 0){
    $.getScript("/assets/js/helper/highlight.min.js", function() { 
        hljs.initHighlightingOnLoad();
    });
}

/**********************
 * RESPONSIVE VIDEOS  *
 **********************/

$.getScript("/assets/js/helper/jquery.fitvids.js", function() { 
    $("#main").fitVids();
});

/************
 * GALLERY  *
 ************/

if($('p img:not(:only-child)').closest('p').length != 0){ // If there is a gallery present.
    $.getScript("/assets/js/helper/imagesloaded.pkgd.min.js", function() { 
        $('p img:not(:only-child)').closest('p').addClass('gallery');
        $(".gallery").imagesLoaded(gallery);
        $(window).resize(gallery);
    });
}

function gallery(){
    $.getScript("/assets/js/helper/gallery.min.js", function() { // Load in script for gallery
        var size = 0;
        if ($(window).height() > $(window).width()){
            size = $(window).height();
        } else {
            size = $(window).width();
        }
        if (size < 210 ){
            size = 210;
        }
        $('.gallery').removeWhitespace().collagePlus(
            {
                'targetHeight':size/5
            }
        );
    });
}

/**********************
 * FULL WIDTH IMAGES  *
 **********************/
    
$.getScript("/assets/js/helper/imagesloaded.pkgd.min.js", function() { 
    function fullImage(){
        $('img[src$="#full"]:only-child').each(function() {
            $(this).addClass("full-loaded");
            $(this).closest("p").css("min-height",$(this).height());
            $(this).closest("p").addClass("full-image-container");
        });
    }
    $("#main").imagesLoaded(fullImage);
    $(window).resize(fullImage);
});
{'fraction_non_alphanumeric': 0.2806094182825485, 'fraction_numerical': 0.00554016620498615, 'mean_word_length': 2.5576354679802957, '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': '3264797', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1082, 'n_words': 153}