<commit_before>
var app = angular.module( 'app', [ 'ngRoute' ] );

app.config( [ '$routeProvider', function( $routeProvider ){
    $routeProvider
    .when( '/search', {
        templateUrl: '/static/jsframework/views/search.html',
        title: 'Search Page',
        controller: 'searchC',
        controllerAs: 'pc',
        css: 'static/app/css/search.css'
     } )
    .when( '/binge_list', {
        templateUrl: '/static/jsframework/views/bingeList.html',
        controller: 'bingeListC',
        controllerAs: 'pc',
        title: 'Binges to Be',
        css: 'static/app/css/bingeList.css'
     } )
    .when( '/community', {
        templateUrl: '/static/jsframework/views/communityBRs.html',
        controller: 'communityBRsC',
        controllerAs: 'pc',
        title: 'Community Bingether Requests',
        css: 'static/app/css/communityBRs.css'
     } )
    .when( '/my_bingethers', {
        templateUrl: '/static/jsframework/views/myBingethers.html',
        controller: 'myBingethersC',
        controllerAs: 'pc',
        title: 'My Bingethers',
        css: 'static/app/css/myBingethers.css'
     } )
    .when( '/', {
        templateUrl: '/static/jsframework/views/index.html',
        controller: 'indexC',
        controllerAs: 'pc',
        title: 'Welcome',
        css: 'static/app/css/index.css'
    })
    .when( '/uh_oh', {
        templateUrl: '/static/jsframework/views/uhOh.html',
        controller: 'uhOhC',
        controllerAs: 'pc',
        title: 'Oh no...',
        css: 'static/app/css/uhOh.css'
    })
    .otherwise({
        redirectTo: '/uh_oh'
    })
}]);

app.run( [ '$location', '$rootScope', function( $location, $rootScope ){
    $rootScope.$on( '$routeChangeSuccess', function( event, current, previous ){
        if ( current.$$route ){
            document.getElementById( 'pageTitle' ).innerHTML = current.$$route.title;
            document.getElementById( 'pageCSS' ).setAttribute( 'href', current.$$route.css );
        }
    } )
}]);<commit_msg>Added  service to handle CSRF token functionality<commit_after>

var app = angular.module( 'app', [ 'ngRoute' ] );

app.config( [ '$routeProvider', '$httpProvider', function( $routeProvider, $httpProvider ){
    $httpProvider.defaults.xsrfCookieName = 'csrftoken';
    $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';

    $routeProvider
    .when( '/search', {
        templateUrl: '/static/jsframework/views/search.html',
        title: 'Search Page',
        controller: 'searchC',
        controllerAs: 'pc',
        css: 'static/app/css/search.css'
     } )
    .when( '/binge_list', {
        templateUrl: '/static/jsframework/views/bingeList.html',
        controller: 'bingeListC',
        controllerAs: 'pc',
        title: 'Binges to Be',
        css: 'static/app/css/bingeList.css'
     } )
    .when( '/community', {
        templateUrl: '/static/jsframework/views/communityBRs.html',
        controller: 'communityBRsC',
        controllerAs: 'pc',
        title: 'Community Bingether Requests',
        css: 'static/app/css/communityBRs.css'
     } )
    .when( '/my_bingethers', {
        templateUrl: '/static/jsframework/views/myBingethers.html',
        controller: 'myBingethersC',
        controllerAs: 'pc',
        title: 'My Bingethers',
        css: 'static/app/css/myBingethers.css'
     } )
    .when( '/', {
        templateUrl: '/static/jsframework/views/index.html',
        controller: 'indexC',
        controllerAs: 'pc',
        title: 'Welcome',
        css: 'static/app/css/index.css'
    })
    .when( '/uh_oh', {
        templateUrl: '/static/jsframework/views/uhOh.html',
        controller: 'uhOhC',
        controllerAs: 'pc',
        title: 'Oh no...',
        css: 'static/app/css/uhOh.css'
    })
    .otherwise({
        redirectTo: '/uh_oh'
    })
}]);

app.run( [ '$location', '$rootScope', function( $location, $rootScope ){
    $rootScope.$on( '$routeChangeSuccess', function( event, current, previous ){
        if ( current.$$route ){
            document.getElementById( 'pageTitle' ).innerHTML = current.$$route.title;
            document.getElementById( 'pageCSS' ).setAttribute( 'href', current.$$route.css );
        }
    } )
}]);
{'fraction_non_alphanumeric': 0.165, 'fraction_numerical': 0.0, 'mean_word_length': 2.4349959116925595, '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': '407705', 'n_tokens_mistral': 1337, 'n_tokens_neox': 1314, 'n_words': 242}