<commit_before>/**
 * jquery.wheel plugin
 * jQuery plugin creating a wheel event based on DOM3 wheel event
 *
 * Author & Copyright: <NAME> <<EMAIL>>
 * License: MIT
 * Repository: https://github.com/mzgol/jquery-wheel
 *
 * Thanks to <NAME> (http://brandonaaron.net) for the idea of this plugin.
 */

(function ($) {
    'use strict';

    if ($.fn.wheel) { // already polyfilled
        return;
    }

    // Normalizing event properties for the 'wheel' event (like event.which etc.).
    $.event.fixHooks.wheel = $.event.mouseHooks;

    var handler = function (orgEvent) {
        var i;
        var args = Array(arguments.length);
        var event = $.event.fix(orgEvent);

        for (i = 0; i < args.length; i++) {
            args[i] = arguments[i];
        }

        event.deltaMode = orgEvent.deltaMode;
        event.deltaX = orgEvent.deltaX;
        event.deltaY = orgEvent.deltaY;
        event.deltaZ = orgEvent.deltaZ;

        // Exchange original event for the modified one in arguments list.
        args[0] = event;

        return $.event.dispatch.apply(this, args);
    };

    // Implementing jQuery `wheel` event via native `wheel` event.
    $.event.special.wheel = {
        setup: function () {
            this.addEventListener('wheel', handler, false);
        },

        teardown: function () {
            this.removeEventListener('wheel', handler, false);
        },
    };

    // Implement `$object.wheel()` and `$object.wheel(handler)`.
    $.fn.wheel = function (data, fn) {
        return arguments.length > 0 ?
            this.on('wheel', null, data, fn) :
            this.trigger('wheel');
    };
})(jQuery);
<commit_msg>Make it compatible with jQuery 3.0<commit_after>/**
 * jquery.wheel plugin
 * jQuery plugin creating a wheel event based on DOM3 wheel event
 *
 * Author & Copyright: <NAME> <<EMAIL>>
 * License: MIT
 * Repository: https://github.com/mzgol/jquery-wheel
 *
 * Thanks to <NAME> (http://brandonaaron.net) for the idea of this plugin.
 */

(function ($) {
    'use strict';

    if ($.fn.wheel) { // already polyfilled
        return;
    }

    // Normalizing event properties for the 'wheel' event (like event.which etc.).
    // This is only needed for jQuery <3.0.
    if ($.event.fixHooks) {
        $.event.fixHooks.wheel = $.event.mouseHooks;
    }

    var handler = function (orgEvent) {
        var i;
        var args = Array(arguments.length);
        var event = $.event.fix(orgEvent);

        for (i = 0; i < args.length; i++) {
            args[i] = arguments[i];
        }

        event.deltaMode = orgEvent.deltaMode;
        event.deltaX = orgEvent.deltaX;
        event.deltaY = orgEvent.deltaY;
        event.deltaZ = orgEvent.deltaZ;

        // Exchange original event for the modified one in arguments list.
        args[0] = event;

        return $.event.dispatch.apply(this, args);
    };

    // Implementing jQuery `wheel` event via native `wheel` event.
    $.event.special.wheel = {
        setup: function () {
            this.addEventListener('wheel', handler, false);
        },

        teardown: function () {
            this.removeEventListener('wheel', handler, false);
        },
    };

    // Implement `$object.wheel()` and `$object.wheel(handler)`.
    $.fn.wheel = function (data, fn) {
        return arguments.length > 0 ?
            this.on('wheel', null, data, fn) :
            this.trigger('wheel');
    };
})(jQuery);

{'fraction_non_alphanumeric': 0.14177583697234353, 'fraction_numerical': 0.0034934497816593887, 'mean_word_length': 2.1785383903792783, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '7016111', 'n_tokens_mistral': 1030, 'n_tokens_neox': 1002, 'n_words': 276}