diff options
Diffstat (limited to 'public/assets/js/index.js')
| -rw-r--r-- | public/assets/js/index.js | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/public/assets/js/index.js b/public/assets/js/index.js index 2e5ac92..fefb7fc 100644 --- a/public/assets/js/index.js +++ b/public/assets/js/index.js @@ -1,13 +1,13 @@ var app = (function(){ var app = {} + var id = -1 + app.init = function(){ - app.router = new SiteRouter () - app.view = null + app.view = new NavView () $(window).on("focus", app.focus) $(window).on("blur", app.blur) - $(window).on("keydown", app.keydown) } app.focused = true @@ -20,24 +20,7 @@ var app = (function(){ app.blur = function(){ app.focused = false } - - app.keydown = function(e){ - switch (e.keyCode) { - case 37: // left - // prev - break - case 39: // right - // next - break - case 38: // up - // home - break - case 40: // down - // random - break - } - } - + document.addEventListener('DOMContentLoaded', app.init) return app |
