summaryrefslogtreecommitdiff
path: root/public/assets/js/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-09-03 13:52:20 -0400
committerJules Laplace <jules@okfoc.us>2015-09-03 13:52:20 -0400
commitf768ab296c07ce93efe9f2507cdf4b795aa10013 (patch)
tree0470e2f1fbf96a23e70e324bbf25d5b286750b30 /public/assets/js/index.js
parent21b3290d8bc6276fb95ece54494fdfb518552de6 (diff)
pull in app skeleton from asdf-yt
Diffstat (limited to 'public/assets/js/index.js')
-rw-r--r--public/assets/js/index.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/public/assets/js/index.js b/public/assets/js/index.js
new file mode 100644
index 0000000..f46c1ac
--- /dev/null
+++ b/public/assets/js/index.js
@@ -0,0 +1,27 @@
+var app = (function(){
+ var app = {}
+
+ app.init = function(){
+ user.init()
+
+ app.router = new SiteRouter ()
+ app.view = null
+
+ $(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)
+
+ return app
+})()