<commit_before>(function ($, window, document) {
    'use strict';

    var cssTransitionSupport = function () {
        var s = document.body || document.documentElement;
        s = s.style;
        if (s.WebkitTransition === '') {
            return '-webkit-';
        }
        if (s.MozTransition === '') {
            return '-moz-';
        }
        if (s.OTransition === '') {
            return '-o-';
        }
        if (s.transition === '') {
            return '';
        }
        return false;
    };

    var isCssTransitionSupport = cssTransitionSupport() !== false;

    var cssTransitionTranslateX = function (element, positionX, speed) {
        var options = {}, prefix = cssTransitionSupport();
        options[prefix + 'transform']  = 'translateX(' + positionX + ')';
        options[prefix + 'transition'] = prefix + 'transform ' + speed + 's linear';
        element.css(options);
    };

    var hasTouch = ('ontouchstart' in window);
    var hasPointers = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;
    var wasTouched = function (event) {
        if (hasTouch) {
            return true;
        }

        if (!hasPointers || typeof event === 'undefined' || typeof event.pointerType === 'undefined') {
            return false;
        }

        if (typeof event.MSPOINTER_TYPE_MOUSE !== 'undefined') {
            if (event.MSPOINTER_TYPE_MOUSE !== event.pointerType) {
                return true;
            }
        } else if (event.pointerType !== 'mouse') {
            return true;
        }

        return false;
    };

    $.fn.imageLightbox = function (opts) {
        var options = $.extend({
            selector: 'id="imagelightbox"',
            allowedTypes: 'png|jpg|jpeg||gif', // add support for generated images without an extension
            animationSpeed: 250,
            preloadNext: true,
            enableKeyboard: true,
            quitOnEnd: false,
            quitOnImgClick: false,
            quitOnDocClick: true,
            quitOnEscKey: true, // quit when Esc key is pressed
            onStart: false,
            onEnd: false,
            onLoadStart: false,
            onLoadEnd: false,

            previousTarget: function () {
                return this.previousTargetDefault();
            },

            previousTargetDefault: function () {
                var targetIndex = targets.index(target) - 1;
                if (targetIndex < 0) {
                    if (options.quitOnEnd === true) {
                        quitLightbox();
                        return false;
                    } else {
                        targetIndex = targets.length - 1;
                    }
                }
                target = targets.eq(targetIndex);
            },

            nextTarget: function () {
                return this.nextTargetDefault();
            },

            nextTargetDefault: function () {
                var targetIndex = targets.index(target) + 1;
                if (targetIndex >= targets.length) {
                    if (options.quitOnEnd === true) {
                        quitLightbox();
                        return false;
                    } else {
                        targetIndex = 0;
                    }
                }
                target = targets.eq(targetIndex);
            },
        }, opts);

        var targets = $([]);
        var target = $();
        var image = $();
        var imageWidth = 0;
        var imageHeight = 0;
        var swipeDiff = 0;
        var inProgress = false;

        var isTargetValid = function (element) {
            var classic = $(element).prop('tagName').toLowerCase() === 'a' && (new RegExp('.(' + options.allowedTypes + ')$', 'i')).test($(element).attr('href'));
            var html5 = $(element).attr('data-lightbox') !== undefined;<commit_msg>Remove else statements after breaking if blocks<commit_after>(function ($, window, document) {
    'use strict';

    var cssTransitionSupport = function () {
        var s = document.body || document.documentElement;
        s = s.style;
        if (s.WebkitTransition === '') {
            return '-webkit-';
        }
        if (s.MozTransition === '') {
            return '-moz-';
        }
        if (s.OTransition === '') {
            return '-o-';
        }
        if (s.transition === '') {
            return '';
        }
        return false;
    };

    var isCssTransitionSupport = cssTransitionSupport() !== false;

    var cssTransitionTranslateX = function (element, positionX, speed) {
        var options = {}, prefix = cssTransitionSupport();
        options[prefix + 'transform']  = 'translateX(' + positionX + ')';
        options[prefix + 'transition'] = prefix + 'transform ' + speed + 's linear';
        element.css(options);
    };

    var hasTouch = ('ontouchstart' in window);
    var hasPointers = window.navigator.pointerEnabled || window.navigator.msPointerEnabled;
    var wasTouched = function (event) {
        if (hasTouch) {
            return true;
        }

        if (!hasPointers || typeof event === 'undefined' || typeof event.pointerType === 'undefined') {
            return false;
        }

        if (typeof event.MSPOINTER_TYPE_MOUSE !== 'undefined') {
            if (event.MSPOINTER_TYPE_MOUSE !== event.pointerType) {
                return true;
            }
        } else if (event.pointerType !== 'mouse') {
            return true;
        }

        return false;
    };

    $.fn.imageLightbox = function (opts) {
        var options = $.extend({
            selector: 'id="imagelightbox"',
            allowedTypes: 'png|jpg|jpeg||gif', // add support for generated images without an extension
            animationSpeed: 250,
            preloadNext: true,
            enableKeyboard: true,
            quitOnEnd: false,
            quitOnImgClick: false,
            quitOnDocClick: true,
            quitOnEscKey: true, // quit when Esc key is pressed
            onStart: false,
            onEnd: false,
            onLoadStart: false,
            onLoadEnd: false,

            previousTarget: function () {
                return this.previousTargetDefault();
            },

            previousTargetDefault: function () {
                var targetIndex = targets.index(target) - 1;
                if (targetIndex < 0) {
                    if (options.quitOnEnd === true) {
                        quitLightbox();
                        return false;
                    }
                    targetIndex = targets.length - 1;
                }
                target = targets.eq(targetIndex);
            },

            nextTarget: function () {
                return this.nextTargetDefault();
            },

            nextTargetDefault: function () {
                var targetIndex = targets.index(target) + 1;
                if (targetIndex >= targets.length) {
                    if (options.quitOnEnd === true) {
                        quitLightbox();
                        return false;
                    }
                    targetIndex = 0;
                }
                target = targets.eq(targetIndex);
            },
        }, opts);

        var targets = $([]);
        var target = $();
        var image = $();
        var imageWidth = 0;
        var imageHeight = 0;
        var swipeDiff = 0;
        var inProgress = false;

        var isTargetValid = function (element) {
            var classic = $(element).prop('tagName').toLowerCase() === 'a' && (new RegExp('.(' + options.allowedTypes + ')$', 'i')).test($(element).attr('href'));
            var html5 = $(element).attr('data-lightbox') !== undefined;
{'fraction_non_alphanumeric': 0.12177985948477751, 'fraction_numerical': 0.00312256049960968, 'mean_word_length': 1.5047246660149887, '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': '6052230', 'n_tokens_mistral': 1987, 'n_tokens_neox': 1887, 'n_words': 465}