Telegram Web, preconfigured for usage in I2P. http://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
2.3 KiB

11 years ago
/*!
* Webogram v0.3.9 - messaging web application for MTProto
11 years ago
* https://github.com/zhukov/webogram
* Copyright (C) 2014 Igor Zhukov <igor.beatle@gmail.com>
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'ngSanitize',
'ngTouch',
11 years ago
'ui.bootstrap',
10 years ago
'mediaPlayer',
'izhukov.utils',
'izhukov.mtproto',
'izhukov.mtproto.wrapper',
11 years ago
'myApp.filters',
'myApp.services',
11 years ago
/*PRODUCTION_ONLY_BEGIN
'myApp.templates',
PRODUCTION_ONLY_END*/
11 years ago
'myApp.directives',
'myApp.controllers'
]).
config(['$locationProvider', '$routeProvider', '$compileProvider', 'StorageProvider', function($locationProvider, $routeProvider, $compileProvider, StorageProvider) {
11 years ago
// var icons = {}, reverseIcons = {}, i, j, hex, name, dataItem, row, column, totalColumns;
// for (j = 0; j < Config.EmojiCategories.length; j++) {
// totalColumns = Config.EmojiCategorySpritesheetDimens[j][1];
// for (i = 0; i < Config.EmojiCategories[j].length; i++) {
// dataItem = Config.Emoji[Config.EmojiCategories[j][i]];
// name = dataItem[1][0];
// row = Math.floor(i / totalColumns);
// column = (i % totalColumns);
// icons[':' + name + ':'] = [j, row, column, ':'+name+':'];
// reverseIcons[name] = dataItem[0];
// }
// }
// $.emojiarea.spritesheetPath = 'img/emojisprite_!.png';
// $.emojiarea.spritesheetDimens = Config.EmojiCategorySpritesheetDimens;
// $.emojiarea.iconSize = 20;
// $.emojiarea.icons = icons;
// $.emojiarea.reverseIcons = reverseIcons;
11 years ago
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|filesystem|chrome-extension|app):|data:image\//);
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|mailto|blob|filesystem|chrome-extension|app):|data:image\//);
11 years ago
if (Config.Modes.test) {
StorageProvider.setPrefix('t_');
}
11 years ago
$routeProvider.when('/', {templateUrl: templateUrl('welcome'), controller: 'AppWelcomeController'});
$routeProvider.when('/login', {templateUrl: templateUrl('login'), controller: 'AppLoginController'});
$routeProvider.when('/im', {templateUrl: templateUrl('im'), controller: 'AppIMController', reloadOnSearch: false});
11 years ago
$routeProvider.otherwise({redirectTo: '/'});
}]);