<commit_before>﻿"use strict";

var SF = SF || {};

if (!SF.Utils) {

SF.Utils = true;
SF.debug = true;

SF.registerModule = (function () {
    var modules = [];

    return function (module, cb) {
        if ($.inArray(module, modules)===-1) {
            modules.push(module);
            cb();
        }
    }
})();

    SF.Loader = (function () {

        var _jsSet = [],
            _jsloaded = [];

        function setLoaded(url, position) {
            _jsloaded[url] = true;
            _jsSet[position].count--;

            if (_jsSet[position].count === 0) {
                _jsSet[position].func && _jsSet[position].func();
                delete _jsSet[position];
            }
        }

        function _loadJs(url, position) {
            if (!_jsloaded[url]) {
                $.getScript(url, function () {
                    setLoaded(url, position);
                });
            } else {
                setLoaded(url, position);
            }
        }

        function loadJs(url, fn) {
            if (typeof url === "object") {  //more than one file
                var position = _jsSet.length;

                _jsSet[position] = {
                    count: url.length,
                    func: fn
                };

                var i;
                for (i = 0; i < url.length; i++) {
                    _loadJs(url[i], position);
                }
            } else {
                $.getScript(url, fn);
            }
        }

        function loadCss(url, cb) {
        var d = document,
            head = d.getElementsByTagName("head")[0],
            link = d.createElement("link");
        link.type = "text/css";
        link.rel = "stylesheet";
        link.href = url;
        if (cb) {
            if ($.browser.msie) {
                link.onreadystatechange = function () {
                    /loaded|complete/.test(link.readyState) && cb();
                };
                } else if ($.browser.opera) {
                link.onload = cb;
                } else
            //FF, Safari, Chrome
                (function () {
                    try {
                        link.sheet.cssRule;
                    } catch (e) {
                        setTimeout(arguments.callee, 20);
                        return;
                    };
                    cb();
                })();
        }
        head.appendChild(link);
    }

        return {
            loadCss: loadCss,
            loadJs: loadJs
};
})();

(function (options) {
    var pendingRequests = 0;

    $.ajaxSetup({
        type: "POST",
        sfCheckRedirection: true,
        sfNotify: true
    });<commit_msg>SF.Loader - loadJs and loadCss deprecated, consider using RequireJs or similar<commit_after>﻿"use strict";

var SF = SF || {};

if (!SF.Utils) {

SF.Utils = true;
SF.debug = true;

SF.registerModule = (function () {
    var modules = [];

    return function (module, cb) {
        if ($.inArray(module, modules)===-1) {
            modules.push(module);
            cb();
        }
    }
})();

(function (options) {
    var pendingRequests = 0;

    $.ajaxSetup({
        type: "POST",
        sfCheckRedirection: true,
        sfNotify: true
    });
{'fraction_non_alphanumeric': 0.13564078578110383, 'fraction_numerical': 0.002806361085126286, 'mean_word_length': 1.2154696132596685, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '5308477', 'n_tokens_mistral': 931, 'n_tokens_neox': 878, 'n_words': 191}