<commit_before>var Auth = function() {
    this.status = {};
    
    //this.check();
    this.Timer = new AuthTimer(this.check);
};

Auth.prototype.ChangedStatus = function(auth) {
    for(var key in auth)
        if(typeof auth[key] != 'undefined')
            this.status[key] = auth[key];
        
    KlavoTools.Button.update();
    this.Timer.start();
};

Auth.prototype.check = function() {
    var self = this;
    
    xhr('http://klavogonki.ru/api/profile/get-messages-contacts?KTS_REQUEST')
    .then(function(res) {
        if(!res)
            return [undefined, undefined, undefined];
        
        var answer = JSON.parse(res);
        if(answer.err)
            return [null, null, 0];
        
        if(!answer.messages[0])
            return null;

        var unread = 0;
        for(var i=0; i<answer.messages.length; i++) {<commit_msg>Auth: старт слежения статуса в фоновом режиме<commit_after>var Auth = function() {
    this.status = {};
    
    this.check();
    this.Timer = new AuthTimer(this.check);
};

Auth.prototype.ChangedStatus = function(auth) {
    for(var key in auth)
        if(typeof auth[key] != 'undefined')
            this.status[key] = auth[key];
        
    KlavoTools.Button.update();
    this.Timer.start();
};

Auth.prototype.check = function() {
    var self = this;
    
    xhr('http://klavogonki.ru/api/profile/get-messages-contacts?KTS_REQUEST')
    .then(function(res) {
        if(!res)
            return [undefined, undefined, undefined];
        
        var answer = JSON.parse(res);
        if(answer.err)
            return [null, null, 0];
        
        if(!answer.messages[0])
            return null;

        var unread = 0;
        for(var i=0; i<answer.messages.length; i++) {
{'fraction_non_alphanumeric': 0.146689497716895, 'fraction_numerical': 0.0045662100456621, 'mean_word_length': 2.1359570661896243, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1670719', 'n_tokens_mistral': 560, 'n_tokens_neox': 559, 'n_words': 108}