summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 560a2a1..30f5975 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2,11 +2,25 @@ var app = (function(){
var app = {}
app.init = function(){
- // ws.connect()
+ user.init()
+
+ app.socket = ws.connect()
+
+ app.router = new SiteRouter ()
$(window).on("focus", app.focus)
$(window).on("blur", app.blur)
}
+ app.focused = true
+
+ app.focus = function(){
+ app.focused = true
+ }
+
+ app.blur = function(){
+ app.focused = false
+ }
+
document.addEventListener('DOMContentLoaded', app.init)
})()