<commit_before>//var jquery = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js";
var jquery = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.js";
var scripts = [ 
    "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js",
    "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/killring.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/history.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/readline.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/shell.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/pathhandler.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/example.js"
];


function scriptsLoaded()
{ 
    window.console.log("scripts loaded, feedlyconsole.js complete");
    window.console.log(jQuery('head'));
}

function callbackjQuery()
{
    jQuery.when.apply(jQuery, jQuery.map(scripts, jQuery.getScript)).done(scriptsLoaded);

}

function loadjQuery(url, callback)
{
    // Adding the script tag to the head as suggested before
    var head = document.getElementsByTagName('head')[0];
    if (typeof jQuery == 'undefined')
    {
        window.console.log('loading jQuery');
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = url;
        
        // Then bind the event to the callback function.
        // There are several events for cross browser compatibility.
        script.onreadystatechange = callback;
        script.onload = callback;
        
        // Fire the loading
        head.appendChild(script);
    }
    else
    {
        window.console.log('jQuery already loaded');
        callback();
    }
}

loadjQuery(jquery, callbackjQuery);
window.console.log("file feedlyconsole.js");
<commit_msg>renamed callbacks to reflect function<commit_after>//var jquery = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js";
var jquery = "http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.js";
var scripts = [ 
    "http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js",
    "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/killring.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/history.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/readline.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/shell.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/pathhandler.js",
    "http://dougbeal.github.io/feedlyconsole/josh.js/js/example.js"
];


function initializeConsole()
{ 
    window.console.log("scripts loaded, feedlyconsole.js complete");
    window.console.log(jQuery('head'));
}

function loadScripts()
{
    jQuery.when.apply(jQuery, jQuery.map(scripts, jQuery.getScript)).done(initializeConsole);

}

function loadjQuery(url, callback)
{
    // Adding the script tag to the head as suggested before
    var head = document.getElementsByTagName('head')[0];
    if (typeof jQuery == 'undefined')
    {
        window.console.log('loading jQuery');
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.src = url;
        
        // Then bind the event to the callback function.
        // There are several events for cross browser compatibility.
        script.onreadystatechange = callback;
        script.onload = callback;
        
        // Fire the loading
        head.appendChild(script);
    }
    else
    {
        window.console.log('jQuery already loaded');
        callback();
    }
}

loadjQuery(jquery, loadScripts);
window.console.log("file feedlyconsole.js");

{'fraction_non_alphanumeric': 0.15408970976253297, 'fraction_numerical': 0.006860158311345646, 'mean_word_length': 3.0632368703108255, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7272359', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1228, 'n_words': 184}