Node.js based forum software built for the modern web
minor cleanups.
Aziz Khoury0e0f66ba9e88
diff --git a/public/src/app.js b/public/src/app.jsindex 270f731d70..9ae50d4d87 100644--- a/public/src/app.js+++ b/public/src/app.js@@ -24,7 +24,7 @@ var socket,reconnecting = false;// Rejoin room that was left when we disconnected- var url_parts = document.location.pathname.slice(RELATIVE_PATH.length).split('/').slice(1);+ var url_parts = window.location.pathname.slice(RELATIVE_PATH.length).split('/').slice(1);var room;switch(url_parts[0]) {@@ -513,7 +513,9 @@ var socket,$('document').ready(function () {var url = window.location.pathname.slice(1),search = window.location.search,- tpl_url = ajaxify.getTemplateMapping(url);+ hash = window.location.hash,+ tpl_url = ajaxify.getTemplateMapping(url),+ $window = $(window);url = url.replace(/\/$/, "");@@ -521,7 +523,7 @@ var socket,url = url.slice(RELATIVE_PATH.length);}- $(window).trigger('action:ajaxify.start', {+ $window.trigger('action:ajaxify.start', {url: url});@@ -533,11 +535,11 @@ var socket,$('#logout-link').on('click', app.logout);- $(window).blur(function(){+ $window.blur(function(){app.isFocused = false;});- $(window).focus(function(){+ $window.focus(function(){app.isFocused = true;app.alternatingTitle('');});@@ -550,21 +552,20 @@ var socket,ajaxify.widgets.render(tpl_url, url);if (window.history && window.history.replaceState) {- var hash = window.location.hash ? window.location.hash : '';window.history.replaceState({url: url + search + hash}, url, RELATIVE_PATH + '/' + url + search + hash);}ajaxify.loadScript(tpl_url, function() {- $(window).trigger('action:ajaxify.end', {+ $window.trigger('action:ajaxify.end', {url: url});});});};- showWelcomeMessage = location.href.indexOf('loggedin') !== -1;+ showWelcomeMessage = window.location.href.indexOf('loggedin') !== -1;app.loadConfig();app.alternatingTitle('');diff --git a/src/controllers/index.js b/src/controllers/index.jsindex 9d3254fca1..cf58f4955c 100644--- a/src/controllers/index.js+++ b/src/controllers/index.js@@ -207,7 +207,6 @@ Controllers.register = function(req, res, next) {data.minimumPasswordLength = meta.config.minimumPasswordLength;data.termsOfUse = meta.config.termsOfUse;- data.captcha = null;plugins.fireHook('filter:register.build', req, res, data, function(err, data) {if (err && process.env === 'development') {winston.warn(JSON.stringify(err));