<commit_before>/*

	Dr ToDo Little
	The main application (tdapp)

*/
var tdapp = angular.module('tdapp', ['ngRoute', 'firebase', 'LocalStorageModule', 'xeditable'])

tdapp.config(function(
    $routeProvider,
    $locationProvider,
    $compileProvider,
    $httpProvider
) {

    // Routing

    $routeProvider
        .when('/', {
            templateUrl: 'main.html',
            controller: 'mainCtrl'
        })
        .when('/todos/:status/:type/:id', {
            templateUrl: 'main.html',
            controller: 'mainCtrl'
        })
        .when('/todos/:type/:id', {
            templateUrl: 'main.html',
            controller: 'mainCtrl'
        })
        .when('/register', {
            templateUrl: 'register.html',
            controller: 'regCtrl'
        })
        .when('/profile', {
            templateUrl: 'profile.html',
            controller: 'profileCtrl'
        })
        .when('/settings/chpwd', {
            templateUrl: 'chpwd.html',
            controller: 'chpwdCtrl'
        })
        .when('/settings/respwd', {
            templateUrl: 'respwd.html',
            controller: 'respwdCtrl'
        })
        .when('/error', {
            templateUrl: 'error.html'
        })
        .otherwise({
            redirectTo: '/error'
        });

    // Performance improvement

    $compileProvider.debugInfoEnabled(false);

    // Disable hashbang urls

    $locationProvider.html5Mode(true);

    // Interceptor

    $httpProvider.interceptors.push('logininterceptor');
})

// Check for test envirionment

var serverurl = "https://rest-api.sloppy.zone/api/todos";
if (window.location.host.startsWith("test")) {
    serverurl = "http://test.drtodolittle.de/api/todos";
}

// Datastore

tdapp.value(
    "appdata", {
        name: "drtodolittle",
        nickname: "derdr",
        cookiename: "derdrcookie",
        localserver: "http://localhost:3000/api/todos",
        server: serverurl,
        rememberme: undefined,
        token: undefined,
        user: undefined,
        lip: undefined,
        errormsg: ""
    }
)

// Angular-xeditable theme

tdapp.run(function(editableOptions) {
    editableOptions.theme = 'bs3';
})
<commit_msg>API URL wieder auf app.drtodolittle.de umgestellt<commit_after>/*

	Dr ToDo Little
	The main application (tdapp)

*/
var tdapp = angular.module('tdapp', ['ngRoute', 'firebase', 'LocalStorageModule', 'xeditable'])

tdapp.config(function(
    $routeProvider,
    $locationProvider,
    $compileProvider,
    $httpProvider
) {

    // Routing

    $routeProvider
        .when('/', {
            templateUrl: 'main.html',
            controller: 'mainCtrl'
        })
        .when('/todos/:status/:type/:id', {
            templateUrl: 'main.html',
            controller: 'mainCtrl'
        })
        .when('/todos/:type/:id', {
            templateUrl: 'main.html',
            controller: 'mainCtrl'
        })
        .when('/register', {
            templateUrl: 'register.html',
            controller: 'regCtrl'
        })
        .when('/profile', {
            templateUrl: 'profile.html',
            controller: 'profileCtrl'
        })
        .when('/settings/chpwd', {
            templateUrl: 'chpwd.html',
            controller: 'chpwdCtrl'
        })
        .when('/settings/respwd', {
            templateUrl: 'respwd.html',
            controller: 'respwdCtrl'
        })
        .when('/error', {
            templateUrl: 'error.html'
        })
        .otherwise({
            redirectTo: '/error'
        });

    // Performance improvement

    $compileProvider.debugInfoEnabled(false);

    // Disable hashbang urls

    $locationProvider.html5Mode(true);

    // Interceptor

    $httpProvider.interceptors.push('logininterceptor');
})

// Check for test envirionment

var serverurl = "https://app.drtodolittle.de/api/todos";
if (window.location.host.startsWith("test")) {
    serverurl = "http://test.drtodolittle.de/api/todos";
}

// Datastore

tdapp.value(
    "appdata", {
        name: "drtodolittle",
        nickname: "derdr",
        cookiename: "derdrcookie",
        localserver: "http://localhost:3000/api/todos",
        server: serverurl,
        rememberme: undefined,
        token: undefined,
        user: undefined,
        lip: undefined,
        errormsg: ""
    }
)

// Angular-xeditable theme

tdapp.run(function(editableOptions) {
    editableOptions.theme = 'bs3';
})

{'fraction_non_alphanumeric': 0.14558255734726322, 'fraction_numerical': 0.0027254144901203725, 'mean_word_length': 2.010252904989747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2432697', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1342, 'n_words': 225}