summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-05 12:53:38 -0400
committerJules Laplace <jules@okfoc.us>2015-08-05 12:53:38 -0400
commitb9aaeaf616ed0a46a81e313bede00f1598d245ca (patch)
tree0d2256c9332b6d0ef97bb56e1c771a976f3497db /public/js/index.js
parent21e31e46ff167ede7cb5ad4452cbd406236bc83d (diff)
parent3b7da491072e5c366738ff549e8958d97948076a (diff)
mergez
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index d1af979..6e171fc 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -2,7 +2,22 @@ var app = (function(){
var app = {}
app.init = function(){
- // app.socket =
+ user.init()
+
+ 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)