<commit_before>let $submitButton;
let $textField;
let $errorField;
let csrf;

$(function() {
    $submitButton = $('.btn');
    $textField = $('input');
    $errorField = $('.error');
    csrf = $('#csrf').text();
    $submitButton.on('click', function() {
        $errorField.hide();
        $.ajax('/device/register',
        {
            method: 'POST',
            data: {
                deviceName: $textField.val(),
                _csrf: csrf
            },
            success: function(data) {
                var d = new Date();<commit_msg>Trying to use new js in browser<commit_after>var $submitButton;
var $textField;
var $errorField;
var csrf;

$(function() {
    $submitButton = $('.btn');
    $textField = $('input');
    $errorField = $('.error');
    csrf = $('#csrf').text();
    $submitButton.on('click', function() {
        $errorField.hide();
        $.ajax('/device/register',
        {
            method: 'POST',
            data: {
                deviceName: $textField.val(),
                _csrf: csrf
            },
            success: function(data) {
                alert('stting cookie');
                var d = new Date();
{'fraction_non_alphanumeric': 0.1729776247848537, 'fraction_numerical': 0.0, 'mean_word_length': 1.8159806295399517, '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': '3699416', 'n_tokens_mistral': 345, 'n_tokens_neox': 335, 'n_words': 75}