blob: 1c8deb57f8b3bcc5a4ad9c69f079d4c0cd20e2a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
var app = (function () {
var app = {};
app.init = function () {
app.debug = !!window.location.search.match("debug");
app.router = new SiteRouter();
app.router.initialize();
app.view = null;
$(window).on("focus", app.focus);
$(window).on("blur", app.blur);
set_background_color_from_time();
auth.init(app.ready);
sdk.init();
};
app.ready = function () {
app.router.route();
};
app.focused = true;
app.typing = false;
app.focus = function () {
app.focused = true;
set_background_color_from_time();
};
app.blur = function () {
app.focused = false;
};
document.addEventListener("DOMContentLoaded", app.init);
return app;
})();
|