3 require('./utils/font-setup');
5 var $ = require('jquery');
6 var context = require('gitter-web-client-context');
7 var clientEnv = require('gitter-client-env');
8 var apiClient = require('./components/api-client');
9 var onready = require('./utils/onready');
10 var appEvents = require('./utils/appevents');
11 var heatmapUtils = require('./components/archive-heatmap-utils');
12 var HeaderView = require('./views/app/headerView');
13 var rightToolbarModel = require('./models/right-toolbar-model');
15 require('./components/timezone-cookie');
16 require('./views/widgets/preload');
17 require('./components/dozy');
18 require('./template/helpers/all');
19 require('./components/bug-reporting');
20 require('./utils/tracking');
21 require('./components/ping');
23 require('@gitterhq/styleguide/css/components/buttons.css');
26 require('./components/link-handler').installLinkHandler();
27 appEvents.on('navigation', function(url) {
28 window.location = url;
31 $('#noindex').on('change', function() {
32 var noindex = $('#noindex')[0].checked;
35 .put('', { noindex: !noindex })
38 'Room indexing disabled. The change will take effect the next time a search engine crawls this room.';
39 $('#noindexStatus').html(!noindex ? msg : '');
42 $('#noindexStatus').html('Oops, something went wrong. Reload and try again.');
46 // When a user clicks an internal link, prevent it from opening in a new window
47 $(document).on('click', 'a.link', function(e) {
48 var basePath = clientEnv['basePath'];
49 var href = e.target.getAttribute('href');
50 if (!href || href.indexOf(basePath) !== 0) {
55 window.parent.location.href = href;
60 model: context.troupe(),
61 rightToolbarModel: rightToolbarModel,
65 heatmapUtils.createResponsiveHeatMap($('#cal-heatmap'));
69 // Backbone.history.start();