<commit_before>(function (init) {
    // jQuery must be defined
	var timer = setInterval(function() {
        if (window.geofs && geofs.aircraft && geofs.aircraft.instance && geofs.aircraft.instance.object3d) {
            clearInterval(timer);
            init();
        }
    }, 16);
})(function () {

    // Default lists
    var aircraftRecord = {
        id: 'aircraft',
        name: 'My Aircraft',
        fullPath: 'local/aircraft/',
        isPremium: false,
        isCommunity: false
    };

    geofs.PRODUCTION = false;

    // Adds aircraft button
    $('ul.geofs-aircraft-list li').remove();
    $('ul.geofs-aircraft-list').append($('<li>')
        .attr('data-aircraft', 'aircraft')
        .text('My Custom Aircraft')
    );

    // Adds the debug button
    $('.geofs-editor-role').attr('style', 'display: inline-block !important');

    // Switches JSON and Javascript mode
    var JSONMode = false;

    function switchMode() {
        if (JSONMode) aircraftRecord.isCommunity = true;
        else aircraftRecord.isCommunity = false;
    }

    $('.geofs-auth form').remove();

    var switchButton = $('<span class="add-on">[Javascript Mode]</span>').appendTo('.geofs-auth');
    switchButton.click(function() {
        if (JSONMode) {
            switchButton.text('[Javascript Mode]');
            JSONMode = false;
        } else {
            switchButton.text('[JSON Mode]');
            JSONMode = true;
        }

        switchMode();
    });

    // Redefines load functions
    geofs.aircraft.Aircraft.prototype.load = function (id, coordinates, bJustReload) {
        $.ajax('/local/aircraft/aircraft.json', {
            dataType: 'text',

            success: function (data, error, a) {
                if (error !== 'error') {
                    aircraftRecord.definition = btoa(data);
                    data = geofs.aircraft.instance.parseRecord(JSON.stringify(aircraftRecord));
                    if (data) {
                        geofs.aircraft.instance.id = id;
                        aircraftRecord.definition = btoa(data);
                        geofs.aircraft.instance.init(data, coordinates, bJustReload);
                    }<commit_msg>Added killcache for json file<commit_after>(function (init) {
    // jQuery must be defined
	var timer = setInterval(function() {
        if (window.geofs && geofs.aircraft && geofs.aircraft.instance && geofs.aircraft.instance.object3d) {
            clearInterval(timer);
            init();
        }
    }, 16);
})(function () {

    // Default lists
    var aircraftRecord = {
        id: 'aircraft',
        name: 'My Aircraft',
        fullPath: 'local/aircraft/',
        isPremium: false,
        isCommunity: false
    };

    geofs.PRODUCTION = false;

    // Adds aircraft button
    $('ul.geofs-aircraft-list li').remove();
    $('ul.geofs-aircraft-list').append($('<li>')
        .attr('data-aircraft', 'aircraft')
        .text('My Custom Aircraft')
    );

    // Adds the debug button
    $('.geofs-editor-role').attr('style', 'display: inline-block !important');

    // Switches JSON and Javascript mode
    var JSONMode = false;

    function switchMode() {
        if (JSONMode) aircraftRecord.isCommunity = true;
        else aircraftRecord.isCommunity = false;
    }

    $('.geofs-auth form').remove();

    var switchButton = $('<span class="add-on">[Javascript Mode]</span>').appendTo('.geofs-auth');
    switchButton.click(function() {
        if (JSONMode) {
            switchButton.text('[Javascript Mode]');
            JSONMode = false;
        } else {
            switchButton.text('[JSON Mode]');
            JSONMode = true;
        }

        switchMode();
    });

    // Redefines load functions
    geofs.aircraft.Aircraft.prototype.load = function (id, coordinates, bJustReload) {
        $.ajax('/local/aircraft/aircraft.json?killcache=' + Date.now(), {
            dataType: 'text',

            success: function (data, error, a) {
                if (error !== 'error') {
                    aircraftRecord.definition = btoa(data);
                    data = geofs.aircraft.instance.parseRecord(JSON.stringify(aircraftRecord));
                    if (data) {
                        geofs.aircraft.instance.id = id;
                        aircraftRecord.definition = btoa(data);
                        geofs.aircraft.instance.init(data, coordinates, bJustReload);
                    }
{'fraction_non_alphanumeric': 0.1410488245931284, 'fraction_numerical': 0.00135623869801085, 'mean_word_length': 1.9979674796747968, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '761602', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1228, 'n_words': 251}