<commit_before>// disable key presses
$(document).ready(function() {
    // disable enter key in input boxes to make sure
    // accidental submits do not happen
    $('input:text').each(function() {
        $(this).bind('keypress', function(e) {
            if (e.keyCode == 13) {
                return false;
            }
        });
    });

    // handle browser window events
    $(window).bind('keypress', function(e) {
        // disable going back by pressing escape
        if (e.keyCode == 8) return false;

        // disable reload by pressing F4
        if (e.keyCode == 115) return false;
    });
});<commit_msg>- binding to window events resulted in strange behaviour<commit_after>// disable key presses
$(document).ready(function() {
    // disable enter key in input boxes to make sure
    // accidental submits do not happen
    $('input:text').each(function() {
        $(this).bind('keypress', function(e) {
            console.log('inputbox keycode: '+e.keyCode);
            if (e.keyCode == 13) {
                return false;
            }
        });
    });
});
{'fraction_non_alphanumeric': 0.1414141414141414, 'fraction_numerical': 0.008264462809917356, 'mean_word_length': 2.07909604519774, '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': '3276918', 'n_tokens_mistral': 311, 'n_tokens_neox': 291, 'n_words': 92}