webogram-i2p/app/js/app.js
Bart 5871645ca6 Fixed subset of StandardJS errors (#1356)
Fixed the errors that would definitly not change the functionality of the program
These include
* Unexpected && and || combinations
* variables with different values defined in same line of code
* Global variable never defined
* spacing/placing errors

These errors were not touched
* variables who are never used
* == and != errors
2017-03-13 21:57:24 +03:00

51 lines
1.7 KiB
JavaScript

/*!
* Webogram v0.5.5 - messaging web application for MTProto
* https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
'use strict'
/* global Config, templateUrl */
var extraModules = []
if (Config.Modes.animations) {
extraModules.push('ngAnimate')
}
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'ngSanitize',
'ngTouch',
'ui.bootstrap',
'mediaPlayer',
'toaster',
'izhukov.utils',
'izhukov.mtproto',
'izhukov.mtproto.wrapper',
'myApp.filters',
'myApp.services',
/*PRODUCTION_ONLY_BEGIN
'myApp.templates',
PRODUCTION_ONLY_END*/
'myApp.directives',
'myApp.controllers'
].concat(extraModules)).config(['$locationProvider', '$routeProvider', '$compileProvider', 'StorageProvider', function ($locationProvider, $routeProvider, $compileProvider, StorageProvider) {
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|filesystem|chrome-extension|app):|data:image\//)
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|tg|mailto|blob|filesystem|chrome-extension|app):|data:/)
/*PRODUCTION_ONLY_BEGIN
$compileProvider.debugInfoEnabled(false)
PRODUCTION_ONLY_END*/
if (Config.Modes.test) {
StorageProvider.setPrefix('t_')
}
$routeProvider.when('/', {template: '', controller: 'AppWelcomeController'})
$routeProvider.when('/login', {templateUrl: templateUrl('login'), controller: 'AppLoginController'})
$routeProvider.when('/im', {templateUrl: templateUrl('im'), controller: 'AppIMController', reloadOnSearch: false})
$routeProvider.otherwise({redirectTo: '/'})
}])