<commit_before>'use strict';
define(['jquery'], function ($) {

    var loadImage = function(wrapper, path) {
        wrapper.append($('<img />').attr('src', path));
    }

    var loadSvg = function (wrapper, path) {
        $.get(path, {}, function (data) {
            wrapper.html(data);
        }, 'text');
    }

    var loadIcons = function() {
        $('#personabar .personabarnav span.icon-loader').each(function() {
            var $this = $(this);
            var path = $this.data('path');
            if (!path) {
                return;
            }

            var ext = path.split('.').pop().toLowerCase();
            if (ext === "svg") {
                loadSvg($this, path);
            } else {
                loadImage($this, path);
            }

            $this.data('path', null);
        });
    }

    return {
        load: function () {
            loadIcons();
        } 
    };
});<commit_msg>CONTENT-8145: append cdv  parameter in icon path.<commit_after>'use strict';
define(['jquery', 'main/config'], function ($, cf) {
    var config = cf.init();
    var loadImage = function(wrapper, path) {
        wrapper.append($('<img />').attr('src', path));
    }

    var loadSvg = function (wrapper, path) {
        $.get(path, {}, function (data) {
            console.log(data);
            wrapper.html(data);
        }, 'text');
    }

    var loadIcons = function() {
        $('#personabar .personabarnav span.icon-loader').each(function() {
            var $this = $(this);
            var path = $this.data('path');
            if (!path) {
                return;
            }

            if (path.indexOf('cdv=') === -1) {
                path += (path.indexOf('?') > -1 ? '&' : '?') + 'cdv=' + config.buildNumber;
            }

            var ext = path.split('?')[0].split('.').pop().toLowerCase();
            if (ext === "svg") {
                loadSvg($this, path);
            } else {
                loadImage($this, path);
            }

            $this.data('path', null);
        });
    }

    return {
        load: function () {
            loadIcons();
        } 
    };
});
{'fraction_non_alphanumeric': 0.17853922452660054, 'fraction_numerical': 0.0031559963931469793, 'mean_word_length': 1.3911637931034482, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1921040', 'n_tokens_mistral': 647, 'n_tokens_neox': 621, 'n_words': 126}