summaryrefslogtreecommitdiff
path: root/public/assets/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/index.js')
-rw-r--r--public/assets/js/index.js70
1 files changed, 36 insertions, 34 deletions
diff --git a/public/assets/js/index.js b/public/assets/js/index.js
index 51c2226..1c8deb5 100644
--- a/public/assets/js/index.js
+++ b/public/assets/js/index.js
@@ -1,36 +1,38 @@
-var app = (function(){
- var app = {}
-
- app.init = function(){
- app.debug = !! window.location.search.match('debug')
- app.router = new SiteRouter ()
- app.view = null
+var app = (function () {
+ var app = {};
- $(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
- }
+ app.init = function () {
+ app.debug = !!window.location.search.match("debug");
+ app.router = new SiteRouter();
+ app.router.initialize();
+ app.view = null;
- app.blur = function(){
- app.focused = false
- }
-
- document.addEventListener('DOMContentLoaded', app.init)
-
- return app
-})()
+ $(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;
+})();