Node.js based forum software built for the modern web
removing defunct "template" argument in ajaxify.go
Julian Lamd86aefb518ae
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.jsindex e0c69687f6..0645448c72 100644--- a/public/src/ajaxify.js+++ b/public/src/ajaxify.js@@ -25,7 +25,7 @@ var ajaxify = {};window.onpopstate = function (event) {// "quiet": If set to true, will not call pushStateif (event !== null && event.state && event.state.url !== undefined) {- ajaxify.go(event.state.url, null, null, true);+ ajaxify.go(event.state.url, null, true);}};@@ -33,7 +33,7 @@ var ajaxify = {};ajaxify.currentPage = null;- ajaxify.go = function (url, callback, template, quiet) {+ ajaxify.go = function (url, callback, quiet) {// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs$(window).off('scroll');app.enterRoom('global');@@ -125,7 +125,7 @@ var ajaxify = {};app.refreshTitle(url);- }, url, template);+ }, url);return true;}diff --git a/public/src/app.js b/public/src/app.jsindex 837403d906..54dc546630 100644--- a/public/src/app.js+++ b/public/src/app.js@@ -465,7 +465,7 @@ var socket,jQuery('document').ready(function () {$('#search-form').on('submit', function () {var input = $(this).find('input');- ajaxify.go("search/" + input.val(), null, "search");+ ajaxify.go("search/" + input.val());input.val('');return false;});@@ -476,6 +476,8 @@ var socket,$(window).focus(function(){app.isFocused = true;++ app.alternatingTitle('');});});diff --git a/public/src/templates.js b/public/src/templates.jsindex e629ef08b6..53f7919f91 100644--- a/public/src/templates.js+++ b/public/src/templates.js@@ -126,8 +126,7 @@templates.load_template = function (callback, url, template) {var location = document.location || window.location,api_url = (url === '' || url === '/') ? 'home' : url,- tpl_url = templates.get_custom_map(api_url.split('?')[0]),- trimmed = api_url;+ tpl_url = templates.get_custom_map(api_url.split('?')[0]);if (!tpl_url) {tpl_url = templates.getTemplateNameFromUrl(api_url);