<commit_before>/*jslint browser: true */
/*globals $, tangelo, d3 */

var app = {};
app.lyra = null;
app.loaded = null;

function createNew() {
    launchLyra({
        editor: true
    });
}

function edit() {
    launchLyra({
        editor: true,
        filename: app.filename
    });
}

function launchLyra(qargs) {
    var query = $.param(qargs || {});
    if (query.length > 0) {
        query = "?" + query;
    }

    app.lyra = window.open("/lyra/editor.html" + query, "_blank");
}<commit_msg>Added a few more control parameters to use Lyra in "editor mode"<commit_after>/*jslint browser: true */
/*globals $, tangelo, d3 */

var app = {};
app.lyra = null;
app.loaded = null;

function createNew() {
    launchLyra({
        editor: true,
        savefile: new Date().toString()
    });
}

function edit() {
    launchLyra({
        editor: true,
        loadfile: app.filename,
        savefile: new Date().toString()
    });
}

function launchLyra(qargs) {
    var query = $.param(qargs || {});
    if (query.length > 0) {
        query = "?" + query;
    }

    app.lyra = window.open("/lyra/editor.html" + query, "_blank");
}
{'fraction_non_alphanumeric': 0.17032484635645304, 'fraction_numerical': 0.003511852502194908, 'mean_word_length': 2.475609756097561, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3204324', 'n_tokens_mistral': 398, 'n_tokens_neox': 384, 'n_words': 93}