<commit_before>/*global require*/
'use strict';

require.config({
    shim: {
        bootstrap: {
            deps: ['jquery'],
            exports: 'jquery'
        },
        handlebars: {
            exports: 'Handlebars'
        },
        facebook: {
            exports: 'FB'
        },
        q: {
            exports: 'Q'
        }
    },
    paths: {
        jquery: '../bower_components/jquery/dist/jquery',
        backbone: '../bower_components/backbone/backbone',
        underscore: '../bower_components/underscore/underscore',
        bootstrap: '../bower_components/sass-bootstrap/dist/js/bootstrap',
        handlebars: '../bower_components/handlebars/handlebars',
        leaflet: '../bower_components/leaflet-dist/leaflet',
        facebook: 'http://connect.facebook.net/en_US/all',
        q: '../bower_components/q/q'
    }
});

require([
    'backbone',
    'routers/main',
    'models/user'
], function (Backbone, MainRouter, UserModel) {
    var router = new MainRouter();

    FB.init({
        appId      : '661666163920134',
    });


    FB.getLoginStatus(function(response) {
        if (response.status === 'connected') {
            FB.api('/me', function(response){
                UserModel.set(response);
                FB.api('/me?fields=picture', function(response){
                    router.navigate('#reports');
                    UserModel.set(response.name);
                });
            });
            
        }
    });

    
    Backbone.history.start();
});<commit_msg>Fixed autologin to facebook<commit_after>/*global require*/
'use strict';

require.config({
    shim: {
        bootstrap: {
            deps: ['jquery'],
            exports: 'jquery'
        },
        handlebars: {
            exports: 'Handlebars'
        },
        facebook: {
            exports: 'FB'
        },
        q: {
            exports: 'Q'
        }
    },
    paths: {
        jquery: '../bower_components/jquery/dist/jquery',
        backbone: '../bower_components/backbone/backbone',
        underscore: '../bower_components/underscore/underscore',
        bootstrap: '../bower_components/sass-bootstrap/dist/js/bootstrap',
        handlebars: '../bower_components/handlebars/handlebars',
        leaflet: '../bower_components/leaflet-dist/leaflet',
        facebook: 'http://connect.facebook.net/en_US/all',
        q: '../bower_components/q/q'
    }
});

require([
    'backbone',
    'routers/main',
    'models/user'
], function (Backbone, MainRouter, UserModel) {
    var router = new MainRouter();

    FB.init({
        appId      : '661666163920134',
    });


    FB.getLoginStatus(function(response) {
        if (response.status === 'connected') {
            FB.api('/me', function(response){
                UserModel.set(response);
                FB.api('/me?fields=picture', function(response){
                    UserModel.set(response.name);
                    router.navigate('#reports', {trigger: true});
                });
            });
            
        }
    });

    
    Backbone.history.start();
});
{'fraction_non_alphanumeric': 0.15404614884627885, 'fraction_numerical': 0.009749756256093598, 'mean_word_length': 1.7433155080213905, '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': '3905010', 'n_tokens_mistral': 936, 'n_tokens_neox': 878, 'n_words': 133}