<commit_before>function init_prng () {
    // Start SJCL built-in collectors
    sjcl.random.startCollectors();

    // Seed from window.crypto if present
    var cryptoObj = window.crypto || window.msCrypto; // for IE 11
    if (cryptoObj) {
        var bytes = new Uint32Array(4);
        cryptoObj.getRandomValues(bytes);
        sjcl.random.addEntropy(bytes[0], 32);
        sjcl.random.addEntropy(bytes[1], 32);
        sjcl.random.addEntropy(bytes[2], 32);
        sjcl.random.addEntropy(bytes[3], 32);
        if (console) {
            console.log("PRNG successfully initialized using crypto object");
        }
    } else {
        alert("The random number generator could not be safely initialized. You should use a more modern browser.");
    }
}

init_prng();<commit_msg>Do no longer show warning when window.cryto is unavailable<commit_after>function init_prng () {
    // Start SJCL built-in collectors
    sjcl.random.startCollectors();

    // Seed from window.crypto if present
    var cryptoObj = window.crypto || window.msCrypto; // for IE 11
    if (cryptoObj) {
        var bytes = new Uint32Array(4);
        cryptoObj.getRandomValues(bytes);
        sjcl.random.addEntropy(bytes[0], 32);
        sjcl.random.addEntropy(bytes[1], 32);
        sjcl.random.addEntropy(bytes[2], 32);
        sjcl.random.addEntropy(bytes[3], 32);
        if (console) {
            console.log("PRNG successfully initialized using crypto object");
        }
    }
}

init_prng();
{'fraction_non_alphanumeric': 0.1188386225523295, 'fraction_numerical': 0.022957461174881837, 'mean_word_length': 2.6957605985037407, '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': '1174859', 'n_tokens_mistral': 475, 'n_tokens_neox': 454, 'n_words': 110}