|
|
@ -9,7 +9,6 @@ require('jquery-form');
|
|
|
|
window.utils = require('./utils');
|
|
|
|
window.utils = require('./utils');
|
|
|
|
require('timeago');
|
|
|
|
require('timeago');
|
|
|
|
|
|
|
|
|
|
|
|
const Visibility = require('visibilityjs');
|
|
|
|
|
|
|
|
const Benchpress = require('benchpressjs');
|
|
|
|
const Benchpress = require('benchpressjs');
|
|
|
|
Benchpress.setGlobal('config', config);
|
|
|
|
Benchpress.setGlobal('config', config);
|
|
|
|
|
|
|
|
|
|
|
@ -19,7 +18,11 @@ require('./ajaxify');
|
|
|
|
|
|
|
|
|
|
|
|
app = window.app || {};
|
|
|
|
app = window.app || {};
|
|
|
|
|
|
|
|
|
|
|
|
app.isFocused = true;
|
|
|
|
Object.defineProperty(app, 'isFocused', {
|
|
|
|
|
|
|
|
get() {
|
|
|
|
|
|
|
|
return document.visibilityState === 'visible';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
app.currentRoom = null;
|
|
|
|
app.currentRoom = null;
|
|
|
|
app.widgets = {};
|
|
|
|
app.widgets = {};
|
|
|
|
app.flags = {};
|
|
|
|
app.flags = {};
|
|
|
@ -95,10 +98,6 @@ if (document.readyState === 'loading') {
|
|
|
|
app.newTopic();
|
|
|
|
app.newTopic();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Visibility.change(function (event, state) {
|
|
|
|
|
|
|
|
app.isFocused = state === 'visible';
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
registerServiceWorker();
|
|
|
|
registerServiceWorker();
|
|
|
|
|
|
|
|
|
|
|
|
require([
|
|
|
|
require([
|
|
|
|