From 5eec403809726fc2f0e914ef13ad51d15564e9ab Mon Sep 17 00:00:00 2001 From: julian laplace Date: Wed, 26 Oct 2022 17:38:08 +0200 Subject: prev/next working :) --- public/assets/js/index.js | 74 ++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 36 deletions(-) (limited to 'public/assets/js/index.js') 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 - - $(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.blur = function(){ - app.focused = false - } - - document.addEventListener('DOMContentLoaded', app.init) - - return app -})() +var app = (function () { + var app = {}; + + app.init = function () { + app.debug = !!window.location.search.match("debug"); + app.router = new SiteRouter(); + app.router.initialize(); + app.view = null; + + $(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; +})(); -- cgit v1.2.3-70-g09d2